#development

1 messages Β· Page 1278 of 1

umbral zealot
#

that means you'll have to await the first embed send and put it in a variable.

eternal osprey
#

i know how to

#

thanks!

#

first one that could eventually help me

umbral zealot
#

thought you're also gonna have the problem people describe where it's going to spam 10 edits every 5 seconds. Just... btw.

eternal osprey
#
 const embed = new Discord.MessageEmbed();
          
          embed.setTitle("Twitter Feed Poster");
          embed.setDescription(`${status.text}`);
          embed.setImage(`${status.user.profile_image_url}`);
          embed.setFooter("Command created for Pokehub!");
          embed.setColor("#FF0000");
          embed.setAuthor(
            "@" + `${status.user.screen_name}\n` + `${status.user.name}`
          );
          embed.setURL(
            `https://twitter.com/${status.user_screen_name}/status/${status.id_str}`
          );
          
          await message.channel.send(embed)
          let msg = embed
          msg.edit()
          message.channel.send(msg)```
#

i do have this?

#

idk if it would work tbh.

umbral zealot
#

no, the message.channel.send needs to be put in the variable, not the embed

#

because it's the message you're going to edit

#

and then, msg.edit needs to contain the new embed - INSIDE your setInterval.

eternal osprey
#

oowwwh

#

wait

umbral zealot
#

pseudo code ```
msg = await channel end
setInterval( () => {
get the tweets
make a single embed for all tweets
msg.edit(tweetembed)
}, 5000)

slender thistle
#

Don't end channels

eternal osprey
#

send is what he meant

#

i give up tho.

#

3 hours

#

and still not working.

#

thanks for the help!

umbral zealot
#

You would struggle a lot less if you took the time to go through a javascript tutorial.

#

for a couple weeks.

opaque eagle
#

How can I remove all listeners from an EventTarget?

umbral zealot
opaque eagle
#

oh thanks

shrewd shore
#

@quartz kindle from internet

quartz kindle
#

which website

peak osprey
zenith terrace
peak osprey
#

?

#

im just trying to get it to show the account age but yet it wont work lol

umbral zealot
zenith terrace
umbral zealot
#

How do you know if it's a member or a user?

#

Javascript be confuuuuused yo

peak osprey
#

it works if you type .user

umbral zealot
#

member is a user if you mention someone

peak osprey
#

but if i type .user @umbral zealot it wont work

umbral zealot
#

so you're doing user.user

peak osprey
#

so how do i fix that?

#

so it will show the persons user if i ping them

zenith terrace
#

maybe do the mentionedUser since it has message.author

peak osprey
#

where in the code

#

which line

#

i have mentioned user

#
 else if (message.content.startsWith(".user")) {
    const exampleEmbed = new Discord.MessageEmbed()
    let mentionedUser = message.mentions.users.first() || message.author;
    let member = message.mentions.users.first() || message.member 
    const embed = new Discord.MessageEmbed()
        .setTitle("Lightbot Dev Team")
        .addField("ID:",  mentionedUser.id, true)
        .addField("Account Age:", Date.now() - member.user.createdAt)
        .addField("Highest Role", member.roles.highest)
    message.channel.send(embed).catch(err => console.log(err));
}```
carmine summit
#

client.users.cache.get('487511010886942720').voice.channel.name no work

thin turret
#

which line
@peak osprey the error will tell you all

peak osprey
#

i got it

#
else if (message.content.startsWith(".user")) {
    const exampleEmbed = new Discord.MessageEmbed()
    let mentionedUser = message.mentions.members.first() || message.author;
    let member = message.mentions.members.first() || message.member 
    const embed = new Discord.MessageEmbed()
        .setTitle("Lightbot Dev Team")
        .addField("ID:",  mentionedUser.id, true)
        .addField("Account Age:", Date.now() - member.user.createdAt)
        .addField("Highest Role", member.roles.highest)
    message.channel.send(embed).catch(err => console.log(err));
}```
#

but the account age is in ms

still merlin
#

remove the date.now

peak osprey
#

ok

zenith terrace
#

or use moment

umbral zealot
#

and now you have "the mentioned MEMBER or the message USER"
message.mentions.members.first() || message.author;

#

stop mixing data types notlikenoot

earnest phoenix
#

@frail seal

peak osprey
zenith terrace
#

joinedAt

peak osprey
#

is that for the Guild?

pale vessel
#

stop making up properties and read docs
~cry

zenith terrace
#

yes, and that ^

pale vessel
#

joinedAt is a member property

#

member.joinedAt

opaque eagle
#
earnest phoenix
#

owo

#

client.users.cache.get('487511010886942720').voice.channel.name no work
@carmine summit because the user is not in a voice channel?

carmine summit
#

@carmine summit because the user is not in a voice channel?
@earnest phoenix I am in the channel

#

listening to music

earnest phoenix
#

f

carmine summit
#

went to do the ?eval command

#

says undefined

earnest phoenix
#

that's a user

#

not a guildmember

#

bruh

carmine summit
#

huh???

#

???

earnest phoenix
#
#

voice is for GuildMembers

#

read docs

carmine summit
earnest phoenix
#

yep

narrow cloak
#

any best host website to host my repl

earnest phoenix
#

message.member returns a GuildMember

carmine summit
#

message.guld.members.get().voice.channel.name

#

guld oof

earnest phoenix
#

any best host website to host my repl
best host website
repl
@narrow cloak yeah it's big brain time

narrow cloak
#

hey wht you mean

carmine summit
#

repl is best if you're broke and need it to run semi 24/7

narrow cloak
#

repl is best if you're broke and need it to run semi 24/7
@carmine summit how can i

carmine summit
#

sadly it doesnt support ffmpeg and all that juicy stuffs

earnest phoenix
#

any best host website to host my repl
@narrow cloak why and/or how the fuck would a different website host your repl.it repl that's just weird

please find a brain

narrow cloak
#

so how can i host

earnest phoenix
#

so how can i host
@narrow cloak put your files from repl.it to the host bruh

thick gull
#

i think he means an uptimer

#

?

narrow cloak
#

any steps from any websites

carmine summit
#

uh

#

check express

earnest phoenix
#

any steps from any websites
@narrow cloak the (other) host website has docs probably

carmine summit
#

npm i express

thick gull
#

no

#

hes asking for a host

carmine summit
#

uh

#

copy paste your code

#

then press run?

earnest phoenix
#

google cloud has a lot of tutorials and stuff for hosting

#

copy paste your code
then press run?
@carmine summit imagine giving repl.it hosting instructions to a guy that's tryna move to a new VPS/host

carmine summit
#

oh

restive furnace
#

read the ✨ pins ✨

carmine summit
#

download

#

the

#

thing

narrow cloak
#

oh any help please tell me detail

carmine summit
#

theres an option in the hamburger "download as ZIP"

#

yeah press that

restive furnace
#

and to upload your πŸ”₯ bot πŸ”₯ simply use filezilla or git

carmine summit
#

who uses filezilla on 2020

open rune
#

use filezilla

earnest phoenix
#

theres an option in the hamburger "download as ZIP"
@carmine summit society has changed a lot burgers now have buttons

restive furnace
#

who uses filezilla on 2020
@carmine summit well if the man/woman is πŸ’© not πŸ’© familar to git

open rune
#

why πŸ’©

restive furnace
#

because i like to ✨ emojize ✨ my messages, even i am not a 7 year old.

narrow cloak
#

you all dont fight i am a beginner and i just want to clarify my douts thats alll

restive furnace
#

https://anidiots.guide explains about hosting too if i remember ✨ right ✨

carmine summit
restive furnace
#

yes, Im using repl to host my bot because im to poor to use digitalocean
@carmine summit theres more than one πŸ”₯ host πŸ”₯ for example: contabo, galaxygate.

open rune
#

are u looking 4 hosting?

carmine summit
#

yah but i prefer digitalocean

open rune
#

when I was kid, I used to try hostinger

restive furnace
#

digitalocean isnt the best/fastest tho

narrow cloak
#

if i can speek my bot ???????????

restive furnace
#

big companies uses some random unknown hosting/their own

carmine summit
#

if i can speek my bot ???????????
@narrow cloak What language is that?

open rune
#

why not VPS (just asking)

opal plank
#

quick question i forgot

#

does setInterval() run the moment its declared?

#

or only when the timer runs out?

pale vessel
#

runs out

open rune
#

setinvertval will be repeated after timer runs out

opal plank
#

ty

#

ik what it does

#

just wondering if it ran on declaration

quartz kindle
#

it should have an option to run immediately tbh, its so annoying having to wrap stuff into a function and call it twice

delicate shore
#

RangeError: Source is too large

#

Why do I get this error

#

During music

elder thicket
#

Songs too long???

opal plank
#

@quartz kindle i know

#

i did recall a term with a self calling function

#

its runs once its declared

#

but i forgot how to do it

fluid basin
#

huh

opal plank
#

self-invoking*

fluid basin
#

anonymous functions?

opal plank
#

nah, the term is self invoking

#

it should call itself upon start

quartz kindle
#

a self invoking function is easy, but you cant really combine it with an interval that easily

opal plank
#

could run the whole thing inside itself

#

call this after its done

#

actually this wouldnt rok

#

work*

#
function selfCalling() {
//logic
delay(100);
selfCalling();
}
#

that should do

quartz kindle
#

yeah you could do something like that instead of an interval

opal plank
#

setTimeout inside to mimic delay

#

so something like ....

#
(function selfCalling() {
//logic
delay(100);
selfCalling();
})()```
this
#

that should work i guess

quartz kindle
#

yup

opal plank
#

who needs setInterval

#

is this flexing?

#

i feel like this is flexing

quartz kindle
#

now i have this thing running forever on my browser discord client

#

lmao

opal plank
#

lmao

#

i think it warns you if its an infinite loop

quartz kindle
opal plank
#

though im not sure if it counts for functions

#

does it throw error/warning of infinite loop?

quartz kindle
#

it runs every 2 seconds so its not a big deal, but if i hit f12 its still there

opal plank
#

ctrl shift r should clena it

quartz kindle
#

its not an infinite loop because its on a timer

opal plank
#

hard reload

quartz kindle
#

yeah i dont wanna reload discord

#

:^)

opal plank
#

i mean, i guess thats exactly what setInterval is

#

guess who just crashed the production server again

quartz kindle
#

noob

opal plank
#

should stabilize soon

#

hopefully

#

maybe

#

perhaps

#

i think

#

ish

slender thistle
#

lmao Tim lazy bum

quartz kindle
#

you have no idea

#

windows has been complaining about updates for over a month and i refuse to restart it because i dont want to have to reopen all my shit

slender thistle
#

πŸ˜‚ πŸ˜‚ πŸ˜‚

quartz kindle
#

even though i have a good enough ssd so the update should take less than a minute

compact oriole
#

windows 10 2004 preview took 2 hours to update even though my pc is buff

quartz kindle
#

to update or to install?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

compact oriole
#

update

sage bobcat
#

One message removed from a suspended account.

compact oriole
#

from 1904

quartz kindle
#

because like if you're updating from 2004 to 2004, thats an update

#

from 1904 to 2004 thats a full install

#

not a from scratch install, but an install update of a big part of the system

#

thats why the update is 3gb+ big

compact oriole
#

it was preview too

#

when you needed to "select" it

#

I just wanted wsl 2 LUL

quartz kindle
#

ye but windows 10's build releases are like that now, they are basically trying to copy what apple does with its mac versions

compact oriole
#

idk why it took so long

quartz kindle
#

going from 1904 to 2004 is almost the same as going from osx 10.14 to osx 10.15

#

its like a system upgrade

compact oriole
#

I have 5-10gb read/write per second ssd, beef cpu

quartz kindle
#

sequential speeds !== to random speeds

compact oriole
#

well good random speeds too

quartz kindle
#

ye but still, randoms are usually an order of magnitude lower than sequential

compact oriole
quartz kindle
#

holy

#

64c for a disk?

compact oriole
#

it's m.2

quartz kindle
#

jeez thats a lot

compact oriole
#

situated here

quartz kindle
compact oriole
#

m.2s run so much hotter

#

and I don't sadly have a cooling plate for it

quartz kindle
#

rip

compact oriole
#

well my other ssds run at 30

quartz kindle
#

yeah those look like normal temps

#

either that one is some beefy motherfucker that needs dedicated cooling, or theres something wrong with it

compact oriole
#

that 64 though sweat

quartz kindle
#

can you undervolt ssds?

#

lmao

compact oriole
#

lmao

quartz kindle
#

i used to undervolt my gpus

compact oriole
quartz kindle
#

why are warning and critical the same

#

logic

compact oriole
#

hmm

#

well it is hot but 20 less than warning/critical

#

maybe I'll be fine?

quartz kindle
#

i mean

#

of course it will be fine

#

just like a cpu running at 90c will be fine

#

but thats not good for long term health

compact oriole
#

true...

quartz kindle
#

put some ice on it

#

:^)

compact oriole
#

especially with all coding stuff open

quartz kindle
#

well coding is not exactly heavy duty stuff xD

#

most of them are idle

compact oriole
#

true

quartz kindle
compact oriole
#

well it's 10% all time

#

also the clock of my cpu...

quartz kindle
#

xD

#

is it intel?

compact oriole
#

ye

#

9900k

quartz kindle
#

they cant compete with efficiency, so they boost the clocks like maniacs

#

lmao

compact oriole
#

yea

#

sadly amd ryzen 3 was not out

#

so I bought 9900k

shy turret
#

how does discord detect if the embed link is a valid image link?

quartz kindle
#

remember people running pentium 4's at 5ghz with liquid nitrogen 15 years ago? that shit was dope

shy turret
#

does it just check http:// or https://

#

in the front?

compact oriole
#

I would've definitely bought 3900x or 3700x

#

remember people running pentium 4's at 5ghz with liquid nitrogen 15 years ago? that shit was dope
I remember seeing vids

#

but im 16 so I kinda couldn't see it myself πŸ˜”βœŠ

opal plank
#

How shady and unethical is it to use the production server to use a VM for playing games?

#

asking for a friend

#

πŸ‘€

compact oriole
#

I always use my production servers for random stuff

quartz kindle
#

@shy turret it detects urls from http basically, but it later on it checks if its an image by either loading its headers, or by checking the file extension

compact oriole
#

that doesn't brake it

quartz kindle
#

for example if you're uploading a file to use in your embed as an attachment, you have to give it the proper file extension in the file name

shy turret
#

hm ok

#

so -> if starts with http/https -> check if a valid image -> sends embed with image
|-> else give error |-> if not, sends embed without image

#

?

fluid basin
#

How shady and unethical is it to use the production server to use a VM for playing games?
@opal plank depends on context I guess, though don't expect great performance due to network latency (those game streaming networks/platforms are heavily optimised), and most VMs don't come with a GPU anyways so you'd get poor graphics performance

quartz kindle
#

@shy turret something like that, idk what they do internally

#

if you use embed.setImage() maybe discord.js also checks something before sending it to discord

opal plank
#

@fluid basin i mean, i know that, but im just saying, 10 gigabit internet and, 128gb ram, 2 insane processors and a fuckton of other shit

quartz kindle
#

or maybe they dont check if its a valid image, they just post the embed with the link anyway, and then your discord client loads it or not

fluid basin
#

well make sure it doesn't interfere with any services running on there basically

shy turret
#

kk

fluid basin
#

although the fact that cpus can't replace gpus still stand

quartz kindle
#

@opal plank dont like scientists game on research supercomputers?

#

lmao

opal plank
#

of course, all im asking is for a friend

#

of course

quartz kindle
#

:^)

faint prism
#

jeez thats a lot
@quartz kindle Mines running 46*C

#

I feel like under 70 isn't too hot

#

it's warm at that point for sure

opal plank
#

whatever temp your shit is at, mine is 27ΒΊC Higher due to tropical country room temp

#

No cooler can keep up with Brazil and a Laptop

dense nest
#

Lool

quartz kindle
#

im in brazil rn btw

#

it 28c here

#

not too bad

dense nest
#

How would i use a mysql database in python

#

Amd I'm in minnesota amd its 45 f

#

I'll covert it to c hold on

quartz kindle
#

thats like 5c lmao

dense nest
#

7c

quartz kindle
#

jeez

#

thats freezing

pure lion
#

@quartz kindle qt sadlove

dense nest
#

@quartz kindle not really

quartz kindle
#

for certain standards it is lmao

dense nest
#

Light pants and sleeeved shirt

#

Kkkkkkkk

quartz kindle
#

and good heating

dense nest
#

Sim

#

It nice when you walk into a warm house

quartz kindle
#

gibe mi mΓ΄ney pleasi or i report iu

#

mordekaiser es #1

dense nest
#

@quartz kindle do you speak brazilian Portuguese

quartz kindle
#

yup

dense nest
#

Im learning

#

Mu favorite thing to say is

#

Muhleres sΓ£o obejectos

quartz kindle
dense nest
#

Ye

autumn aspen
#
let logchannel = message.guild.channels.cache.find(ch => ch.name === "log-channel")
   if(!logchannel) return message.channel.send("Cannot find a log-channel.\n\n:warning:`you cannot currently change to a custom channel`")

I have no idea how to put the text in a embed in this code position?

#

someone help?

shy turret
#

how do you get the shard id?

earnest phoenix
#

XD

shy turret
#

oh i know

#

reaction.message.guild.shardID isnt set

misty sigil
#

client.shard.ids?

shy turret
#

like "the shard" of the guild

#

client.shard.ids shows all the shards

misty sigil
#

oh you’re using internal

quartz kindle
#

are you sure it isnt set?

#

guild.shardID should be set

shy turret
#

i think it worked

#

yah

#

.shardID didnt work the first time but it works again

#

how do you set the shard id of the ready statement

#

(for Bot is ready!)

quartz kindle
#

are you using the shardingManager?

shy turret
#

yes

quartz kindle
#

client.shard.ids[0] i think

#

let me check

shy turret
#

specifically

    let { ShardingManager } = require('discord.js');
    let manager = new ShardingManager('./bot.js', { token: settings.discord.bot.token });
    
    manager.on('shardCreate', shard => console.log(`[Shard ${shard.id}] Loading shard.`));
    manager.spawn();
#

client.shard.ids[0] would just get 0 or null

#

i think

quartz kindle
#

yes its client.shard.ids[0]

shy turret
#

hm ok

quartz kindle
#

0 is the first shard

#

1 is the second shard

#

and so on

shy turret
#
client.on('ready', () => {
  console.log('[Shard ' + client.shard.ids[0] + '] Shard is ready!');
});

something doesnt feel right

#

but ok

#

idk why im adding this useless piece of code, im just gonna make Bot is ready! for shardCreate

#

almost finished with my bot with 1 command

pale vessel
#

kurasuta 😎

peak osprey
#
else if(command === "purge") {
      const deleteCount = parseInt(args[0], 10);
      if(!message.member.hasPermission("MANAGE_CHANNELS")) {
        return message.channel.send(`**${message.author.username}**, You do not have perms to purge the chat`)
      }
      
      else if(!message.guild.me.hasPermission("MANAGE_CHANNELS")) {
        return message.channel.send(`**${message.author.username}**, I do not have perms to purge the chat`)
      }
      
      else if(!deleteCount || deleteCount < 2 || deleteCount > 100)
        return message.reply("Please provide a number between 2 and 100 for the number of messages to delete");
      else {
          async function purge() {
          message.channel.bulkDelete(deleteCount)

          .then(message.channel.send(`Purged ${deleteCount} messages!`))
          .catch(e => message.reply(`I could not purge because ${e}.`))
          
          message.delete({ timeout: 3000 })
           .then(msg => console.log(`Deleted message from ${msg.author.username} after 3 seconds`))
           .catch(console.error);
      }
      purge()
      }}```

i have had some many problem's with this i just want confirmation I did it correct
pale vessel
#

what are the problems?

dense nest
#

@pale vessel how can I use a mysql database in python?

peak osprey
#

it wont delete the "purged (Number) messages!" after 3seconds

pale vessel
#

@dense nest use a wrapper

#

should be somewhere in pypi

dense nest
#

How~

#

Ive never used a database

pale vessel
#

do you have a mysql server set up at least?

dense nest
#

Ye

hazy sparrow
pale vessel
autumn aspen
#

guys why did I get an error for npm quick.db?

earnest phoenix
#

What error

#

is it because of that shitty "Integer" lib?

misty sigil
#

npm i quick.db?

earnest phoenix
#

I assume

autumn aspen
#

is it because of that shitty "Integer" lib?
@earnest phoenix no like alot of errors

earnest phoenix
#

quick.db uses shity ass integer module which fails to install 99.9999859843598374985% of times

#

@misty sigil

#

@earnest phoenix no like alot of errors
@autumn aspen send like a screenshot of a few of them please

autumn aspen
#

quick.db uses shity ass integer module which fails to install 99.9999859843598374985% of times
@earnest phoenix how can u install it otherwise?

earnest phoenix
#

you cant

autumn aspen
#

bruuuuh

earnest phoenix
#

that shitty ass lib is mandatory for quick.db

autumn aspen
#

so how do I get it then

#

npm db?

misty sigil
#

just use mongo?

dense nest
#

@pale vessel so do i have to define it?

pale vessel
#

define?

#

define what

earnest phoenix
#

i swear if the question is "do i need to define a variable to use it?"

#

Does anyone know how to get the ID of a timeout?

pale vessel
#

id...of...a...timeout?

#

don't you have to assign it to a variable?

earnest phoenix
#

i dont know to be honest

pale vessel
#

if you want to clear it

misty sigil
#

You do

earnest phoenix
#

or am i just stupid

misty sigil
#

it’s the variable the timeout is assigned to

earnest phoenix
#

uh

#

var timeout = setTimeout()
// timeout is the timeout id
clearTimeout(timeout)

hazy sparrow
#

imagine not using codeblocks

earnest phoenix
#

ohhh

#

i get it

#

thank you

#

imagine not using codeblocks
@hazy sparrow you're making a fun of yourself mate

hazy sparrow
#
yeah i know
earnest phoenix
#
- imagine not using code blocks
hazy sparrow
#
smh me and the boys in our group chat by changing the group name
earnest phoenix
#
fuhne yellow text
#
discord changed markdown code block style yay
sinful thistle
#

Epic

#

Discord Is EPIC 1 1

earnest phoenix
#

...

pale vessel
#

kill me

earnest phoenix
#

||you mean this shit?||

hazy sparrow
sinful thistle
#

I am EPIC

#

Bruh

#

Why

#

is

#

it not

#

working

hazy sparrow
#

lol

#

|| i am EPIC ||

earnest phoenix
#

I am EPIC
@sinful thistle bruh it's three backticks not two with a space quit whining

sinful thistle
#

Dam

#

Dam

#

EPIC

#

EPIC

earnest phoenix
#

Dam
Dam
@sinful thistle *beavers intensify*...?

hazy sparrow
#

wait how do you do that

earnest phoenix
#

EPIC
@sinful thistle btw there is no soace between the backtick

#

wait how do you do that
@hazy sparrow he put a backtick inside an (inline) code block KEK

hazy sparrow
#

epic

sinful thistle
#

Oh

hazy sparrow
#

oh lmfao

earnest phoenix
sinful thistle
#

It is so great to figure out how much of a Dumbass I am

autumn aspen
#

guys how do I intall the package antispam?

hazy sparrow
autumn aspen
#

are fkn sesly with me

#

srsly

earnest phoenix
#

guys how do I intall the package antispam?
@autumn aspen npm install <package-name> it would be npm install antispam for antispam

digital ibex
#

code913 is a dick sometimes, endph

hazy sparrow
#

code913 is a dick sometimes, endph
@digital ibex always has been

autumn aspen
#

@autumn aspen npm install <package-name> it would be npm install antispam for antispam
@earnest phoenix but it said it doesnt exict

#

like the antispam

earnest phoenix
#

because

#

that is pseudocode

autumn aspen
#

so what do I type

earnest phoenix
#

correct name of the package....

upper elm
#

yeah you can look it up

autumn aspen
#

yes but what is it for it?

#

antispam.js

#

or what

pale vessel
autumn aspen
#

lmao

hazy sparrow
digital ibex
#

how's it pseudocode lol

upper elm
#

npm i discord-anti-spam

earnest phoenix
#

how's it pseudocode lol
@digital ibex read it throughly

pale vessel
#

look it up
did you try looking it up first

upper elm
#

that

#

i think?

#

i don't really know don't take my word for it i am not legally responsible if npm i discord-anti-spam ruins your bot

digital ibex
#

still dont understand how it is but ok

autumn aspen
#

@digital ibex read it throughly
@earnest phoenix is antispam = pseudocode

digital ibex
#

im pretty sure the library is called discord-antispam @autumn aspen

earnest phoenix
#

did you try looking it up first
@pale vessel do you actually think they will

digital ibex
#

i remember u being a dick code, but jesus calm tf down

pale vessel
#

i asked you...

earnest phoenix
#

wrong emoji sry

hazy sparrow
#

lol my host just requires me to put the thing in package.json and it will work

#

ez windows-build-tools in 0.5secs

upper elm
#

:|

autumn aspen
#

im pretty sure the library is called discord-antispam @autumn aspen
@digital ibex no its not

earnest phoenix
#

lol my host just requires me to put the thing in package.json and it will work
@hazy sparrow that's how npm works it reads data from package.json and installs it when needed
however you can still do limited npm shit without package.json

autumn aspen
#

what is it?????

upper elm
#

i have a question on how to include multiple files in my program :/

earnest phoenix
digital ibex
#

did u try discord-antispam?

hazy sparrow
#

i have a question on how to include multiple files in my program :/
@upper elm explain pls

digital ibex
#

ok its not

upper elm
#

so i want to make my code cleaner by putting my code for different commands in different files

misty sigil
#

just require them then

autumn aspen
digital ibex
misty sigil
#

you can require more than one file

hazy sparrow
#

use command handler

upper elm
#

yea that's what i said

digital ibex
#

"stop gay" lmfao

hazy sparrow
#

@upper elm use a command handler

upper elm
#

what's that

earnest phoenix
#

@earnest phoenix bro stop gay
@autumn aspen imagine asking us a billion times a thing which every single node.js programmer knows then telling us to stop

digital ibex
#

this channel is hell

upper elm
#

yes it is

hazy sparrow
#

always has been

earnest phoenix
#

yep

digital ibex
#

it never used to be this bad tho

autumn aspen
#

guys lmao it better-discord-antispam

upper elm
#

lol this is the third time i've asked for command help on here and it was fine the first two times

autumn aspen
#

lol this is the third time i've asked for command help on here and it was fine the first two times
@upper elm whasup bud

upper elm
#

ima google what a command handler is

#

ill come back if i still have problems

hazy sparrow
#

@upper elm d.js?

upper elm
#

mhm

hazy sparrow
upper elm
#

oh awesome thx

#

have a cookie (>^-^)>πŸͺ

hazy sparrow
#

nom nom intensifies

autumn aspen
#

@earnest phoenix lmao it is npm better-discord-antispam

earnest phoenix
#

how the fuck do you open shell on repl.it mobile
tried typing shell in the commands tab nothing shows up
why are companies trying to eradicate smartphones

autumn aspen
#

can u dowload a js file from an array in index.json?

#

I cant get a command handler :/

#

LMFAO jk!!!!1

earnest phoenix
#

can u dowload a js file from an array in index.json?
@autumn aspen
lemme rephrase that

can you download a file from an array inside a JSON file?

how da fuck do you download files from an array in a can't-run-an-HTTP-server-and-serve-files JSON file

hazy sparrow
misty sigil
#

Bruh

#

you don’t know how to?

earnest phoenix
#

how much nodes do you need for 2500 servers?

valid frigate
#

2

earnest phoenix
#

ok

valid frigate
#

or really any number

#

it doesnt matter

earnest phoenix
#

thanks

upper elm
#

ok so far this makes sense

misty sigil
#

just json [ {name:"command", run:"insert code to be evalled here"} ]

earnest phoenix
#

ok so far this makes sense
@upper elm we literally told you nothing who are you talking to lmfao

hazy sparrow
#

mw

#

me

#

i think

cobalt spruce
#

i need help

misty sigil
hazy sparrow
#

^

#

tell your question @cobalt spruce

cobalt spruce
#

```if (message.content.startsWith(${prefix}embed)){
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply('Sorry, you do not have permission!');
var title = message.content.slice(prefix.length).split(' ').splice(1).join(' ')
var color = message.content.slice(prefix.length).split(' ').splice(2).join(' ')
var sayembed = new Discord.MessageEmbed
.setTitle(title)
.setDescription(sayembed)
message.channel.send(sayembed);
message.delete().catch(O_o=>{});

}

#

help

#

it wont work

misty sigil
#

Why?

cobalt spruce
#

ops

#

idk

misty sigil
#

Why won’t it work

#

tell us errors

earnest phoenix
#

@cobalt spruce you can't just send a big-ass code block and ask what's wrong

misty sigil
hazy sparrow
#

"it wont work" provides absolutly no information for us

cobalt spruce
#

no errors

misty sigil
#

Found the error

#

it’s new Discord.MessageEmbed()

#

and why

#

why are you setting the fucking embed as the description

hazy sparrow
#

lmfaoo

#

embed inside embed

zenith terrace
#

yes

earnest phoenix
#
.catch(0_o=>{});

takes deep breath

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

hazy sparrow
#

0_o

umbral zealot
#

I love using that. πŸ˜‚

zenith terrace
#

@earnest phoenix lEtS caLM nOw

autumn aspen
#

Guys Im so fucking stupid I deleted of mistake my serverinfo.js FILE!!!!!!!!!!!!!!!!

#

How do I get it back 🀑

sonic lodge
#

tuff

misty sigil
#

The recycle bin idot

zenith terrace
#

remake it mmLul

sonic lodge
#

unless if you somehow emptied it while it was in there

autumn aspen
#

The recycle bin idot
@misty sigil oh forgot how do I get it there lmao

#

remake it :mmLul:
@zenith terrace πŸ’€

#

guys how do I got to recycle bin

#

get to

#

@earnest phoenix how do I get to recycle bin now again

#

🀑

opal plank
#

this is the one time im hoping this is a troll

autumn aspen
#

this is the one time im hoping this is a troll
@opal plank yeaaaaaaah..

opal plank
#

you telling me you trying to make a bot and you dont know what/where the recycle bin is?

autumn aspen
#

you telling me you trying to make a bot and you dont know what/where the recycle bin is?
@opal plank yes 🀑

#

but just answer how do I get to recycle bin?

opal plank
#

its on ur desktop

autumn aspen
#

lmao

#

its on ur desktop
@opal plank damn that was close

#

I found the command

opal plank
#

you welcome

hazy sparrow
#

how to make aliases for commands with a command handler?

opal plank
#

just map the command again but instead of name use the aliases too

hazy sparrow
#
const Discord = require("discord.js");

const client = new Discord.Client();

const fs = require('fs');

const prefix = 'bow ';


client.commands = new Discord.Collection();

const commandFiles = fs.readdirSync(`./Commands/`)
for(const file of commandFiles){
     const command = require(`./Commands/${file}`);

    const name = file.split('.')[0];
    client.commands.set(name, command);
  }
 
  const cooldowns = new Discord.Collection();
  client.on("ready", () => {
  console.log("bow bot is online!!");
  client.user.setActivity(`${client.users.cache.size} people!`, { type: 'WATCHING' });
  
});




client.on("message", (message) => {
  
  if (!message.content.toLowerCase().startsWith(prefix) || message.author.bot) return;
  const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
 
if (!cooldowns.has(command.name)) {
    cooldowns.set(command.name, new Discord.Collection());
}



 

if(client.commands.has(command)) {
   client.commands.get(command).execute(message)
 
  }
 


}

  )
 









  client.login('NzI1NjMwMjkwNTg3ODExOTQ5.Xw8lQ.aNqF_ii6thN-J9hhTWOdLXOsQEI')
// fake token dw

this is my index.js

opal plank
#

genius

#

token

misty sigil
#

OOOOO

opal plank
#

go reset that shit

hazy sparrow
#

yo

opal plank
#

delete that

hazy sparrow
#

read the comment

misty sigil
#

@opal plank read the comments

opal plank
#

and go reset your token

hazy sparrow
#

dum dum

opal plank
#

oh

misty sigil
opal plank
#

why u troll

#

imma shit on that identation now

sonic lodge
#

what if he's bluffing

hazy sparrow
opal plank
#

loop the liases

#

imma check rn

hazy sparrow
#

sure go ahread and check mmLol

sonic lodge
#

aw i wanted to ruin someone's day today

sinful thistle
#

Oof

opal plank
#

invalid token

#

good

#

anyway

#

check if alias exist

#

if it does, map it with it

sinful thistle
#

aw i wanted to ruin someone's day today
@sonic lodge probably gonna get alot of hate that happened to me in #memes-and-media

hazy sparrow
#

check if alias exist
@opal plank how? do i go into every command and check?

opal plank
#

if(command.alias) for (alias in command.alias) map(alias, command)

hazy sparrow
#

oh shit

#

invalid token
@opal plank you still have a chance

#

i deleted one charecter from somewhere in the token gl finding it out

opal plank
#

yeah no thanks

#

got better shit to do with my life

pale vessel
#

why not just set the alias as a property in the command file and use commands.find(x => x.name == input || x.alias && x.alias.includes(input)) for example

opal plank
#

its all reference either way

#

shouldnt matter

pale vessel
#

looping seems a bit too much

opal plank
#

how come?

#

you only mapping it once

#

and then indexing it

#

better than running loops on EVERY command

pale vessel
#

what is he even trying to do

opal plank
#

aliases for commands

hazy sparrow
#

if(command.alias) for (alias in command.alias) map(alias, command)
@opal plank smol brain cant comprehed where to put that >:(

opal plank
#

smol brain should know im telling you the framework and that you shouldnt be copy pasting stuff

hazy sparrow
#

wait nvm

#

found it

sinful thistle
#

Something is wrong with my bot it's not responding to the commands did my bot crashed?

hazy sparrow
#

idk see console or errors or show cod

#

code*

sinful thistle
#

alright.

#

yep my bot crashed.

hazy sparrow
opal plank
#

@split hazel

#

check deleted logs

hazy sparrow
#

@earnest phoenix is the person

#
module.exports = {
    name: 'reload',
    description: 'Reloads a command',
    execute(message) {
        const prefix = "bow"
        if (!message.content.startsWith(prefix) || message.author.bot) return;

        const args = message.content.slice(prefix.length).trim().split(/ +/);
        
        if (message.author.id === '542278740537769985'){
        if (!args.length) return message.channel.send(`You didn't pass any command to reload, ${message.author}!`);
const commandName = args[1].toLowerCase();
const command = message.client.commands.get(commandName)
    || message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName));
    delete require.cache[require.resolve(`./${command.name}.js`)];
    try {
        const newCommand = require(`./${command.name}.js`);
        message.client.commands.set(newCommand.name, newCommand);
    } catch (error) {
        console.log(error);
        message.channel.send(`There was an error while reloading a command \`${commandName}\`:\n\`${error.message}\``);
    }
    message.channel.send(`Command \`${command.name}\` was reloaded!`);
    if (!command) return message.channel.send(`There is no command with name or alias \`${commandName}\`, ${message.author}!`);
    }
 else return;
},
};

this little piece of crap always tries to reload user-ifo when i command it to reload user-info

misty sigil
#

message.client?

#

it’s just client

hazy sparrow
#

thats the issue?

sonic lodge
#

message.client is fine

autumn aspen
#
try{
user.send(`${user} you have been **Warned by** ${message.author} in the server ${message.gild.name} with the reason of \`${reason}\``)
} catch (err){
console.log(err)
}

I got an err of "Cannot read property of 'name'" why?
My command works good it doesnt break but when I warn someone this pops up why?

#

also it doesnt send it to the user

#

the embed

#

help anyone?

sonic lodge
#

you misspelled guild

autumn aspen
#

lmaooooooooooo

brisk portal
#

pls give code help discord.js

autumn aspen
#

See thats why Im poop at coding

#

always misspelling

misty sigil
#

Try reading your code

leaden rover
#

Does anyone know how to change a bot's language in discord.py? If someone were to do changelanguage spanish, then it would be in spanish

compact oriole
#

that is a big thing

leaden rover
#

Also, is there a way to make it so an admin can make another user have perms to ban?

compact oriole
#

not just like a few lines

leaden rover
#

As in a modrole

#

Ok, I'll just focus on the modrole thingy

eternal osprey
#

hey

#
message.content
      .slice(prefix.length)
      .replace(/^tweet/,  "")``` i also want to cut an args
#

cuz i have a !tweet (your messsage) #channel command

#

how would i replace 2 messagess?

#

can't i jusst add another .replace?

autumn aspen
#

Guys fun fact: if u get a message by the bot and u type its prefix of a one of its command it gives u a err but dont break it

compact oriole
#

no?

autumn aspen
#

Always when Im getting an err I think its broken lmao

compact oriole
#

it doesn't give an error for me

#

because I know how to code my own bot

autumn aspen
#

it doesn't give an error for me
@compact oriole wdym what does like stop that

compact oriole
autumn aspen
#

dude

#

lmao

#

is it break;?

#

bc Its so annoying

leaden rover
#

How do I make a modrole command that sets the modrole so that users with that role can ban and stuff?

autumn aspen
#

How do I make a modrole command that sets the modrole so that users with that role can ban and stuff?
@leaden rover dude search up

earnest phoenix
#

@earnest phoenix how do I get to recycle bin now again
@autumn aspen can you fucking stop randomly pinging me then telling us I'm cancer

leaden rover
#

@leaden rover dude search up
@autumn aspen well, the internet won't be specific enough

autumn aspen
#

@autumn aspen can you fucking stop randomly pinging me then telling us I'm cancer
@earnest phoenix lol ok

#

Guys why do I get a message by Durchie bot?

leaden rover
#

idk

autumn aspen
#

WTF

#

WHY ME!

earnest phoenix
#

don't say why me and say try me

#

bruuuh

#

wtf, i get too

autumn aspen
#

lol

#

wait

earnest phoenix
#

@modern sable hey

autumn aspen
modern sable
#

yeah it dm'd everyone that was sending a message

humble gyro
#

That's a not cool bot

modern sable
#

already kicked it

earnest phoenix
#

@earnest phoenix how do I get to recycle bin now again
@autumn aspen can you fucking stop randomly pinging me then telling us I'm cancer

misty sigil
#

veld ping

autumn aspen
#

already kicked it
@modern sable thx

#

veld ping
@misty sigil lmao

#

@autumn aspen can you fucking stop randomly pinging me then telling us I'm cancer
@earnest phoenix what again?

earnest phoenix
#

network issues sry
seems like I'm sending messages through four instances of discord

#

dude search up
@autumn aspen imagine telling other people to do smth you ignored when we told you to

compact oriole
#

exactly

#

and also stop asking every question here

#

and try to actually make it yourself

faint prism
#

Anyone here performance test their API?

humble gyro
#

what api?

faint prism
#

Their own, not one in particular

opal plank
faint prism
#

I'm using LoadRunner right now, and it's got some good stats tbh. I kinda like it

opal plank
eternal osprey
#

could someone help me

opal plank
#

oh thats a handled error

#

its just a timeout

#

nvm its fine

#

bot is fine

#

false posivit

autumn aspen
opal plank
autumn aspen
#

lol

faint prism
#

Check my 30 HTTP 500 errors mmLol

earnest phoenix
#

I just ran

c.eval Client.users.cache.forEach(user => {
    user.send("hello");
});
faint prism
#

Good job

opal plank
#

uppercase client

faint prism
#

Did it work at intended

opal plank
#

Client isnt a constructor

#

its a variable

compact oriole
#

imagine not sharding

opal plank
#

imagine not making your own clustering for apis that dont offer sharding. Plebs

compact oriole
#

bro

#

I've made clustering for Kubernetes

opal plank
#

using pre made stuff

#

shame

compact oriole
#

combination of redis and custom

opal plank
compact oriole
#

But can your solution spawn 100000 shards

#

exactly

quartz kindle
#

ew shardingmanager

compact oriole
opal plank
#

yes it can

compact oriole
#

does it use Kubernmetes?

#

(or let me rephrase it)

#

does it run on multiple nodes

opal plank
#

who needs kubernetes when Node has clustering with IPC

compact oriole
#

multiple nodes aka multiple vps/pcs

#

if not, weak

quartz kindle
#

who needs either of those, discord is cheap af in resources

#

:^)

faint prism
#

Who needs clustering when you can just spawn a new thread for it's own sharded client mmLol

compact oriole
#

also I don't use bad discord.js shardingmanager

#

I use chad kurasuta shardingmanager

opal plank
#

twitch doesnt enjoy haivng 1 client connected to 10k streams as its flagged for datamining

quartz kindle
#

shards:"auto" > kurasuta

opal plank
#

guess we gonna split it up

#

something's going on

#

wheres the giveaway?

earnest phoenix
#

what exactly does a prototype mean in JS?

faint prism
#

It's their attempt at a class structure

earnest phoenix
#

It's their attempt at a class structure
@faint prism congrats you're deprecated (MDN strikethroughs stuff in the sidebar which is deprecated)

compact oriole
#

that's why i don't use virgin JS

#

I use chad TS :)

#

(basically js with types/interfaces/latest es support)

cinder patio
earnest phoenix
#

@cinder patio thanks

faint prism
#

@faint prism congrats you're deprecated (MDN strikethroughs stuff in the sidebar which is deprecated)
@earnest phoenix I can't event find that original post I made lol

thick gull
#

who needs either of those, discord is cheap af in resources
cough discord.js-light cough

you

cough

#
(node:16644) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

i do not know what i did to cause this

#

i quite literally just updated my schemas in mongoose

#

oh ok i shouldv'e googled it

#

it happens when you make something required that's unique

quartz kindle
#

js's prototypes are awesome

thick gull
icy saffron
#

C @uneven badger

earnest phoenix
#

js's prototypes are awesome
@quartz kindle yes and no

peak osprey
earnest phoenix
#

How do you guys think I should go about making cooldowns in my bottom?
1️⃣ Make a discord.js Collection that stores timestamps
2️⃣ Store the timestamps in SQL

quartz kindle
#

cooldowns in your bottom?

#

do you shit that much?

earnest phoenix
#

cooldowns in your bottom?
do you shit that much?
@quartz kindle uhh yeah

slender thistle
#

lmfao

#

It's botum

faint prism
#

Make it runtime

compact oriole
#

yea

faint prism
#

Don't bother storing in a dbms

cinder patio
#

Unless the cooldowns are more than an hour, store them in memory

compact oriole
#

yea

#

also it would be a huge hassle to make it in db...

#

except like redis would be easiest

knotty sigil
#

Somebody knows how to get random line from .txt file then remove the line from .txt file

autumn aspen
#
const embed2 = new Discord.MessageEmbed()
   .setTitle("Muted")
   .addField(`${message.mentions.users.first().username} was successfully **Muted**  by ${message.mentions.author.first().username} for \__${time}__\, with the reason of \`${reason}\``)
   .setColor(0x75ff58)
   .setFooter("Modicus | Muted")

   message.channel.send(embed2)

Is this smh right?

compact oriole
#

well try it LUL

autumn aspen
#

lol oke

#

well try it :LUL:
@compact oriole it didnt work :/

sudden geyser
#

Refer to the documentation for help: https://discord.js.org/#/docs/main/stable/class/Message

For example, if you go click on mentions, you'll see there's no property called author. If you go back to the Message class, you'll see there is a property called author which will be the user who sent the message (message.author).

valid frigate
#

question

#

whats a good amount of shards to use for 70 guilds

compact oriole
#

50

#

case closed.

valid frigate
#

ok making 50 shards

earnest phoenix
#

70 and hope each shard gets its own guild

compact oriole
#

true

misty sigil
#

nah

#

make 69 cuz thats funy

west vapor
#

just started making a bot for luls and i can say im bot fascinated and confused so props to u lot :)

autumn aspen
#

Refer to the documentation for help: https://discord.js.org/#/docs/main/stable/class/Message

For example, if you go click on mentions, you'll see there's no property called author. If you go back to the Message class, you'll see there is a property called author which will be the user who sent the message (message.author).
@sudden geyser thx it worked now as I expected

west vapor
#

i also have a question gettubg type error for line 11 (file.endswith) wondering if any of u had any ideas on this

sudden geyser
#

did you mean endsWith?

west vapor
#

possibly

#

nope that dont work

#

im rather lost cus it was working for the vid im following (like i said never done this before) but not for me

sudden geyser
#

Do you get a new error? Are you sure it's not working, as it should. endswith is not a method on a string, but endsWith is (case sensitive). Did you save the file?

proven lantern
#

does readdir return a file or directory?

sudden geyser
#

array of files or directories in directory

proven lantern
#

probably a directory

west vapor
#

says endswith is not defined

proven lantern
#

withFileTypes

sudden geyser
#

show your source code pls

earnest phoenix
#

if you enable withFileTypes it returns an array of Dirent objects

west vapor
#

if its me being stupid do tell me XD very much learning

sudden geyser
west vapor
#

i put it back a second ago cus i was getting not defined error

#

helps if i put the client id back in

sudden geyser
#

Like I told you, you need to replace endswith with endsWith. JavaScript is case-sensitive and endswith is not a method on a string.

west vapor
#

ahhh ok sorry didnt see the caps W first time

#

im smart lol

#

now i see why my friends told me that java is ew

#

XD oh well thanks anyway. i gotta bounce. have fun

sudden geyser
#

It's not that it's bad (no matter how bad JS is, Python ftw), it's that you're using it incorrectly.

cobalt spruce
#
 if (message.content.startsWith(`${prefix}embed`)){
    if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply('Sorry, you do not have permission!');
    var title = message.content.split(" ").slice(1);
    var saymessage = message.content.split(" ").slice(2);
    var sayembed = new Discord.MessageEmbed
    .setTitle(`${title}`)
    .setDescription(`${saymessage}`)
    message.channel.send(sayembed);

}```
#

guys

#

why this wont work

#

No errors

earnest phoenix
#

what doesn't work

cobalt spruce
#

No Embed Message

earnest phoenix
#

find out why

cobalt spruce
#

Bruh

#

i tried

earnest phoenix
#

what did you try

cobalt spruce
#

will u help or not

earnest phoenix
#

you're expecting me to feed you the answer, which i will not do

#

i will guide you on how you're supposed to diagnose your own problem

cobalt spruce
#

;-;

#

ok

#

guide me

earnest phoenix
#

i asked you what did you try

cobalt spruce
#

i tried to change
var saymessage = message.content.split(" ").slice(2);
with
var sayMessage = message.content.slice(prefix.length).split(' ').splice(2).join(' ')

#

but nothing

earnest phoenix
#

console.log both title and saymessage and see what the console logs

cobalt spruce
#

man

#

am using Github to host it

earnest phoenix
#

no you aren't because github isn't a host

cobalt spruce
#

my pc always crash when i host from my pc

#

ok

#

from heroku

earnest phoenix
#

nasty

#

what does that matter anyways

#

you can console.log regardless on what platform you're on

cobalt spruce
#

that means there no logs

earnest phoenix
#

lol

cobalt spruce
#

am dum

earnest phoenix
#

yes

cobalt spruce
#

i didnt exect dat

#

lol

#

@earnest phoenix

#

did u know how to solve that

#

or u just driving me to no were

earnest phoenix
#

i knew where the problem was as soon as you sent the code

cobalt spruce
#

its in the message.slice

earnest phoenix
#

i'm just teaching you how to resolve your own problems

cobalt spruce
#

but idk were

earnest phoenix
#

it actually isn't, or well is, but you're missing something

cobalt spruce
#

is it ${}?

#

cuz i tried without

earnest phoenix
#

nope

#

that's just string interpolation

#

right now title and saymessage are arrays

#

you can't feed an array to a string

#

you need to join the array (in order to make it a string)

#

that's why i told you to console.log it

#

console.log would say that it's an array

cobalt spruce
#

oh i didnt metion that am new

autumn aspen
#
.setFooter("Time warned", client.user.displayAvatarURL())

Guys I want it to send the guilds avatar

#

how do I do?

earnest phoenix
#

guild.iconURL()

autumn aspen
#

guild.iconURL()
@earnest phoenix thx

#

@earnest phoenix it was wrong

earnest phoenix
#

What version are you on?

autumn aspen
#

latest

#

@earnest phoenix

#

12.0.1V I think

earnest phoenix
#

Then that should be it

#

can someone help me

autumn aspen
#

it isnt

earnest phoenix
#

Don't forget the ()

autumn aspen
#

hmm

earnest phoenix
#

It's a function

autumn aspen
#

look wait

earnest phoenix
#

can someone help me
@earnest phoenix What's up

autumn aspen
#
("Time warned", guild.iconURL())
.setTimestamp()
#

@earnest phoenix

earnest phoenix
#

Show me the full embed code

autumn aspen
#

aight

earnest phoenix
#

where can i send the code?

autumn aspen
#
const embed = new Discord.MessageEmbed()
.setTitle("WARNED")
.addField("Read!", `${user} you have been **Warned** by ${message.author} in the server **${message.guild.name}** with the reason of \`${reason}\``)
.setFooter("Time warned", guild.iconURL())
.setTimestamp()
.setColor(0xff2e2e)

user.send(embed)

@earnest phoenix

#

look

#

the footer

earnest phoenix
#

const { MessageEmbed } = reuqire("discord.js")
const Commando = require("discord.js-commando")
const muteShema = require("@schemas/mute-schema")

module.exports = class IsMutedCommand extends Commando.command {
constructor (client) {
super (client , {
name:"ismuted",
group:"moderation",
membername:"ismuted",
userPermissions: [
"ADMINISTRATOR"
],
discription: "Displays mute information for a user",
argsType: "multiple"
})
}

     run = async (message,args) => {
       //ismuted ID
       
     const {guild} = message
       if (args.length !== 1) {
         message.reply("correct syntax: ${guild.commandPrefix}ismuted <User ID>")
         return
         }

      const id = args[0]

      const currentMute = await guild.members.fetch()
      const target = members.get(id)
      const isInDiscord = !!target

      const currentMute = await muteSchema.findOne({
        userId: id,
        guildId: guild.id,
        current: true
      })

         const embed = new Messageembed()
          .setAuthor(
          "Mute info for ${target ? target.user.tag: id }",
           target ? target.user.displayAvatarURL() : ""
       )
       .addField("Currently muted", currentMute ? "yes": "no")
       .addField("Is in Discord", isInDiscord ? "yes": "no")
      
       if (currentMute) {
         const date = new Date (currentMute.expires)
         embed
         .addField("Muted by", "<@${currentMute.staffId}>")
         .addField("Muted for", currentMute.reason.toLowerCase())
         .addFfield("Muted expires", "${data.toLocaleString()} EST") 
        }

       message.reply(embed)
cobalt spruce
#

#delete

autumn aspen
#

const { MessageEmbed } = reuqire("discord.js")
const Commando = require("discord.js-commando")
const muteShema = require("@schemas/mute-schema")

module.exports = class IsMutedCommand extends Commando.command {
constructor (client) {
super (client , {
name:"ismuted",
group:"moderation",
membername:"ismuted",
userPermissions: [
"ADMINISTRATOR"
],
discription: "Displays mute information for a user",
argsType: "multiple"
})
}

     run = async (message,args) => {
       //ismuted ID
       
     const {guild} = message
       if (args.length !== 1) {
         message.reply("correct syntax: ${guild.commandPrefix}ismuted <User ID>")
         return
         }

      const id = args[0]

      const currentMute = await guild.members.fetch()
      const target = members.get(id)
      const isInDiscord = !!target

      const currentMute = await muteSchema.findOne({
        userId: id,
        guildId: guild.id,
        current: true
      })

         const embed = new Messageembed()
          .setAuthor(
          "Mute info for ${target ? target.user.tag: id }",
           target ? target.user.displayAvatarURL() : ""
       )
       .addField("Currently muted", currentMute ? "yes": "no")
       .addField("Is in Discord", isInDiscord ? "yes": "no")
      
       if (currentMute) {
         const date = new Date (currentMute.expires)
         embed
         .addField("Muted by", "<@${currentMute.staffId}>")
         .addField("Muted for", currentMute.reason.toLowerCase())
         .addFfield("Muted expires", "${data.toLocaleString()} EST") 
        }

       message.reply(embed)

@earnest phoenix dude put ```js

#

Astrolimit u know error?

earnest phoenix
#

@autumn aspen I don't see anything wrong with that

#

That should work

cobalt spruce
#

!

earnest phoenix
#

Make sure you fully restart the bot

#

Wait is guild defined

cobalt spruce
#

@earnest phoenix

earnest phoenix
#

If its not do msg.guild instead of guild

#

Yeah?

cobalt spruce
#

U know js?

earnest phoenix
#

Yeah

autumn aspen
#

@earnest phoenix error: ReferenceError: guild is not defined

earnest phoenix
#

Bro stop spamming

cobalt spruce
#

``` if (message.content.startsWith(${prefix}embed)){
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply('Sorry, you do not have permission!');
var title = message.content.split(" ").slice(1);
var saymessage = message.content.split(" ").slice(2);
var sayembed = new Discord.MessageEmbed
.setTitle(${title})
.setDescription(${saymessage})
message.channel.send(sayembed);

}```
idk why this wont work

quartz kindle
#

can you please stop posting walls of text

#

use a bin service, like pastebin or hastebin

earnest phoenix
#

@earnest phoenix error: ReferenceError: guild is not defined
@autumn aspen Add msg. in front of guild

#

js

autumn aspen
#

can you please stop posting walls of text
@quartz kindle exactly

#

@earnest phoenix error: ReferenceError: guild is not defined

earnest phoenix
#

``` if (message.content.startsWith(${prefix}embed)){
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply('Sorry, you do not have permission!');
var title = message.content.split(" ").slice(1);
var saymessage = message.content.split(" ").slice(2);
var sayembed = new Discord.MessageEmbed
.setTitle(${title})
.setDescription(${saymessage})
message.channel.send(sayembed);

}```
idk why this wont work
@cobalt spruce I can't know what the problem is if you don't tell me, what's the error

autumn aspen
#

lol

cobalt spruce
#

NO ERROR

#

I just dont get Embed message

#

it doesnt post

#

i think problem in Slice but idk how to fix

earnest phoenix
#

Do you have the MANAGE_MESSAGES Permission?

cobalt spruce
#

yes

quartz kindle
#

new DIscord.MessageEmbed**()**

cobalt spruce
#

is not MANAGE_MESSAGES

earnest phoenix
#

Oh yeah ^^

#

Add ()

cobalt spruce
#

let me try

autumn aspen
#
ReferenceError: guild is not defined
    at Object.module.exports.run (C:\Users\admin\apemodicus\commands\warn.js:35:27)
    at Client.<anonymous> (C:\Users\admin\apemodicus\index.js:40:34)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\admin\apemodicus\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:315:20)

@earnest phoenix it didnt work either

#

I tryed guild.msg.iconURL()