#development

1 messages · Page 1893 of 1

earnest phoenix
#

lowercase it

#

and store the card as lowercase too

#

and i tried ```js
cardss.includes(args.join(' ').toLocaleLowerCase())

#

or use cardss.some

earnest phoenix
earnest phoenix
#

k

#

It's like .includes but better

#

pass a function that converts the card name and args to lowercase then checks if they're equal

#

better i leave it like this

#
["Mega Knight"].some(c => c.toLowerCase() === args.join(" ").toLowerCase());
earnest phoenix
#

or just lowercase

#

try it and see

#

mega knigh

#

ok

#

works

#

args.join(' ') === "GoblinGang"

#

but this?

#

like

#

this determines the rarity

#

but if args.join(' ') is not Mega Knight (or GoblinGang) it won't work

quartz kindle
#

to make something case insensitive, you need to convert the case for BOTH sides of the comparison

#

a.toLowerCase() === b.toLowerCase()

earnest phoenix
#

?

quartz kindle
#

what dont you understand?

earnest phoenix
#

all

#

you need to convert the case for BOTH sides of the comparison

#

this

quartz kindle
#

both sides

#

of the ===

#

v this has to be lower case
something === something
^ this also has to be lower case

earnest phoenix
#

ok

#

thx

#
- let tru = {
+ "Mega Knight":"megaknight"
- }
How to change chat? .toLowerCase() doesn't work
#

already have it

#

Why discordjs coders are low

#

They even dont know how to code flex css

earnest phoenix
earnest phoenix
slow ibex
earnest phoenix
slow ibex
#

i mean.. i exported it.. its has to be defined.

earnest phoenix
#

ill keep that between us

earnest phoenix
#

also even if you exported it your command handler did not pass the client to the command

slow ibex
#

ugh

earnest phoenix
slow ibex
#

Its undefined

#

So.. how can i pass it to it?

earnest phoenix
#

fix your command handler?

slow ibex
#

Oh.. how could i miss that

earnest phoenix
#
// command
function (args, client) { console.log(client) };

// command handler
command(args, /* put client here */);
earnest phoenix
earnest phoenix
slow ibex
#

Die allready

earnest phoenix
#

doubt is that tim?

slow ibex
#

sigh

earnest phoenix
#

@earnest phoenix are we having a raid again

slow ibex
#

I just realized it isnt from a Command.

earnest phoenix
#

emphasis on again

#

Enable link blockers soldiers okeh

earnest phoenix
slow ibex
#

nvm. its the a Structure Element that gets loaded through a command

earnest phoenix
#

I wanna use / command args

#

*options

#

I want args

earnest phoenix
#

Like real man

#

I want money

#

Like a real programmer

earnest phoenix
earnest phoenix
#

But my reason is i am poor freerealestate

earnest phoenix
spark flint
earnest phoenix
#

so it's not real

slow ibex
#

Now im completely lost and cant understand my own code

earnest phoenix
#

"You gotta understand boy. Money, it's just an object"

"Then why do you want it?"

earnest phoenix
#

ok

#

you can't edit someone else's message

earnest phoenix
#

lol

earnest phoenix
earnest phoenix
#

you want to change Mega Knight to meganight?

#

like if i put Mega knigHt it'll recognise it as Mega Knight and change it to megaknight

#

He wants lowerCase dedector

earnest phoenix
earnest phoenix
earnest phoenix
earnest phoenix
earnest phoenix
#

im getting confused myself

#

guys whats this error

#

cardss.includes(args[0].toLowerCase()))

earnest phoenix
earnest phoenix
#

?

#

"Mega Knight".toLowerCase():"megaknight" doesn't work

earnest phoenix
earnest phoenix
earnest phoenix
quartz kindle
#

how about you show your code

earnest phoenix
quartz kindle
#

otherwise we have no idea what you're doing

earnest phoenix
#

ayo tim

quartz kindle
#

and what you're saying makes no sense

earnest phoenix
#

who?

#

doubt tim is that you?

quartz kindle
#

you

earnest phoenix
#

k

#

pastebin?

quartz kindle
#

ok

earnest phoenix
#

is it safe to declare functions/objects (not from useState) inside react components?
because it will be regenerated again everytime it rerenders

quartz kindle
#

no idea, i dont use react

earnest phoenix
#

then what do you use

quartz kindle
#

nothing

earnest phoenix
#

ofc a god like you uses raw html

quartz kindle
#

html+css+js

earnest phoenix
quartz kindle
#

lmao

earnest phoenix
#

scam link

slow ibex
#

Okay.. so... my command seems to the fine with the client (i guess) So... yeah.. uh... how can i import something with it?

#

const Queue = require('../structures/Queue');

quartz kindle
#

you could remove like 80% of it

earnest phoenix
#

yeah

#
if(args.join(' ').toLowerCase() === "Archers".toLowerCase() || args.join(' ') === "Barbarians" || args.join(' ') === "Goblins" || args.join(' ') === "Minions" || args.join(' ') === "Knight" || args.join(' ') === "Arrows" || args.join(' ') === "Spear Goblins" || args.join(' ') === "Bomber" || args.join(' ') === "Skeleton Dragons" || args.join(' ') === "Fire Spirit" || args.join(' ') === "Skeletons" || args.join(' ') === "Elite Barbarians" || args.join(' ') === "Rascals" || args.join(' ') === "Firecracker" || args.join(' ') === "Zap" || args.join(' ') === "Mortar" || args.join(' ') === "Tesla" || args.join(' ') === "Royal Delivery" || args.join(' ') === "Giant Snowball" || args.join(' ') === "Cannon" || args.join(' ') === "Bats" || args.join(' ') === "Ice Spirit" || args.join(' ') === "Skeleton Barrel" || args.join(' ') === "Electro Spirit" || args.join(' ') === "Minion Horde" || args.join(' ') === "GoblinGang" || args.join(' ') === "Royal Recruits" || args.join(' ').toLowerCase() === "Royal Giant".toLowerCase())rarity = "Common";
#

that determines the rarity

#

lol

#

you are repeating your code too much

#
  "//1": "describes your app and its dependencies",
  "//2": "https://docs.npmjs.com/files/package.json",
  "//3": "updating this file will download and update your packages",
  "name": "hello-express",
  "version": "1.0.2",
  "description": "A simple Node app built on Express, instantly up and running.",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "@discordjs/opus": "^0.5.0",
    "@distube/ytpl": "^1.0.11",
    "akaneko": "^3.0.2",
    "ascii-table": "^0.0.9",
    "avconv": "^3.1.0",
    "await": "^0.2.6",
    "axios": "^0.21.1",
    "canvacord": "^5.0.8",
    "canvas": "^2.8.0",
    "canvas-constructor": "^4.1.0",
    "canvas-senpai": "^0.1.6",
    "common-tags": "^1.8.0",
    "cpu-stat": "^2.0.1",
    "di": "0.0.1",
    "discord-akairo": "^8.1.0",
    "discord-backup": "^2.5.0",
    "discord-buttons": "^4.0.0",
    "discord-giveaways": "^4.4.3",
    "discord-music-player": "^7.2.0",
    "discord-xp": "^1.1.16",
    "discord.js": "^12.3.1",
    "discord.js-commando": "^0.10.0",
    "distube": "^2.8.12",
    "dote": "^1.1.0",
    "dotenv": "^8.2.0",
    "env": "0.0.2",
    "erela.js": "^2.3.1",
    "express": "^4.17.1",
    "ffmpeg-static": "^4.3.0",```
#
    "fs": "^0.0.2",
    "hastebin-gen": "^2.0.5",
    "i": "^0.3.6",
    "imdb-api": "^4.2.0",
    "instagram-api.js": "0.0.8",
    "mal-scraper": "^2.11.3",
    "mathjs": "^7.1.0",
    "moment": "^2.27.0",
    "moment-duration-format": "^2.3.2",
    "mongoose": "^5.9.29",
    "ms": "^2.1.2",
    "neko-love": "^2.0.2",
    "nekos.life": "^2.0.7",
    "node": "^14.17.2",
    "node-fetch": "^2.6.1",
    "node-superfetch": "^0.1.11",
    "novelcovid": "^3.0.0",
    "npm": "^7.6.1",
    "opusscript": "^0.0.7",
    "or": "^0.2.0",
    "os": "^0.1.1",
    "parse-ms": "^2.1.0",
    "path": "^0.12.7",
    "pretty-ms": "^7.0.1",
    "quick.db": "^7.1.3",
    "random-code-gen": "^1.1.2",
    "request": "^2.88.2",
    "request-promise-native": "^1.0.9",
    "simple-youtube-api": "^5.2.1",
    "smartestchatbot": "^2.0.0",
    "snekfetch": "^4.0.4",
    "something-random-on-discord": "^0.0.1",
    "soundcloud-downloader": "^0.2.4",
    "sourcebin_js": "0.0.3-ignore",
    "spotify-url-info": "^2.2.0",
    "srod-v2": "^1.0.1",
    "twemoji-parser": "^13.0.0",
    "twitter-api.js": "0.0.12",
    "weather-js": "^2.0.0",
    "yt-search": "^2.5.1",
    "ytdl-core": "^3.4.2",
    "ytdl-core-discord": "^1.2.5",
    "ytpl": "^2.0.4",
    "ytsr": "^3.2.2"
  },
  "engines": {
    "node": "12.x"
  },
  "repository": {
    "url": ""
  },
  "license": "MIT",
  "keywords": [
    "node",
    "glitch",
    "express"
  ]
}```
#

??

#

tell what is wrong

#

Lmao

#

Libary guy is back

#

pls tell

quartz kindle
#

jesus christ

slow ibex
earnest phoenix
#

the bot took me alot time

#
if (["Archers", "Barbarians", "Goblins"].some(c => c.toLowerCase() === args.join(" ").toLowerCase())) rarity = "Common";
#

@earnest phoenix

quartz kindle
earnest phoenix
#

clash royale?

#

or clans?

#

yeah

#

royale

#

k

nova basin
#

hello can you help me please i wanted to make a database with mongoose but i had an error

earnest phoenix
# earnest phoenix lmao

i love how a guy who doesn't know how to read npm errors is saying lmao to a beginner's bot

earnest phoenix
#

destruction 100

earnest phoenix
pale vessel
#

Mashaallah

#

Never mind

earnest phoenix
#

lmao

earnest phoenix
nova basin
#

Help me please 👀

slow ibex
#

urgh.. im really lost in js. burried under tons of files.

earnest phoenix
#

pay 5$ and get unlimited help

earnest phoenix
earnest phoenix
nova basin
quartz kindle
#

@earnest phoenix```js
// create an object where the keys are already in lowercase and include the name and rarity inside:
const cards = {
"archers": { name: "Archers", rarity: "Rare" },
"mega knight": { name: "Mega Knight", rarity: "Epic" }
etc...
}

// in the message code
const card = cards[args.join("").toLowerCase()];
if(!card) { return message.channel.send("invalid card"); }
const name = card.name;
const rarity = card.rarity;

slow ibex
#

i wrote it.. and dont get what i wrote... so.. xD

earnest phoenix
#

1$ per minute at least

#

You arent unity lol

slow ibex
#

$500 looks like a bargain

earnest phoenix
#

500$ is double the average monthly salary of indians

slow ibex
#

Thats less than our company pays for Support Contracts

earnest phoenix
#

why am i chatting instead of coding?

slow ibex
#

True.

quartz kindle
#

go eat cod

#

codfish

earnest phoenix
#

@lost berry damn i think it's time for another rules only

earnest phoenix
slow ibex
#

So.. yeah.. i dont get this map-thingy you posted earlier

earnest phoenix
#

bruh

#

It says I need nitro to buy nitro

earnest phoenix
slow ibex
#

Ooooooooh now that makes more sense xD

earnest phoenix
#

it was for tahmid

#

i told you your command handler is setup wrong

slow ibex
#

Because it was something with queue

earnest phoenix
#

it's not?

earnest phoenix
#

client is undefined

#

that has nothing to do with queue

nova basin
#

someone could help me

slow ibex
#

Yeah.. but the File that throws the error is Queue.JS that is loaded through play.js.

#

And that File is loaded by the handler. i look into the docs how i can give it the Client.

earnest phoenix
nova basin
slow ibex
#

So it cant be the Command Handler. I just tested it with another Command and that Command gets the Client.

slow ibex
#

Thats my Handler...

fs.readdir('./commands')
    .then(files => {
        for (const file of files.filter(file => file.endsWith('.js'))) {
            const loaded = require('./commands/' + file);

            if (!loaded.command || !loaded.run)
                return console.error(`Missing params from ${file}`);

            commands.set(loaded.command, loaded.run);
            console.log(`Loaded command ${loaded.command}`);
        }
    });

And thats the head of the Command where "Queue.js" gets loaded

onst discord = require('discord.js');
const { queues } = require('..');
const Queue = require('../structures/Queue');
const { msToHMS } = require('../utils');
const config = require('../config.json');

module.exports = {
    /**
     * 
     * @param {string} args 
     * @param {discord.message} message 
     */
    run: async (args, message, client) => {
        console.log(`PlayCMD: `, client);

earnest phoenix
slow ibex
#

i type it into the Textbox and Send it.

#

i think the Problem is in the Class itself... i guess

#

The mighty class

earnest phoenix
#

onst?

slow ibex
earnest phoenix
#

k

slow ibex
#

The error is on line 75

fresh bluff
#

hey guys How do i set up a menu to show my commands?

#

Yeah guys don't click those links my McAfee is saying those links are bad

earnest phoenix
#

a malware version of mcafee was installed on my pc

#

avast detected it

earnest phoenix
#

through a virus ofc

fresh bluff
#

LOL

#

did you fix it?

earnest phoenix
#

it's called AMOGUS LEAKED VERSION

fresh bluff
#

Oh GOD

#

You good now?

vivid fulcrum
#

all external AVs are bullshit

#

just don't do stupid shit on your pc and you're good with windefender

boreal iron
#

Finally some normal dude in here

earnest phoenix
#
useEffect(() => {
socket.on("message", msg => {
    updateMessages(React.Children.toArray([ ...messages, <Message {...msg} />]));
    console.log(messages);
});

return () => socket.disconnect();
}, []);

the value of messages isn't updating in the useEffect smh

#

It's still shows as an empty array

#

even tho the component rerenders with the new value

fresh bluff
#

What are you trying to do?

earnest phoenix
#

setting an event listener on mount?

fresh bluff
#

oh cool

#

Hey guys

#

How do i add a Help command?

pearl trail
earnest phoenix
#

you're only supposed to do that once

pearl trail
#

so like

useEffect(() => {
console.log(messages)
}, [messages])
earnest phoenix
#

i wonder if there's a socket.io event for removing a listener

fresh bluff
#

Hey guys to add a Embed do i need to install a package?

grim aspen
#

You don’t need a package for an embed

fresh bluff
#

ok then how do i add a embed?

grim aspen
#

Library?

pearl trail
fresh bluff
#

bc i get this when i try to

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! UnimportantLikableDesigners@1.0.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the UnimportantLikableDesigners@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-03T14_30_24_401Z-debug.log
exit status 1

pearl trail
#

np

fair axle
#

what does it mean?

pearl trail
#

try downgrading node-fetch

fair axle
#

what?

fresh bluff
grim aspen
pearl trail
#

the newer version of node-fetch require us to use import fetch from "node-fetch"

pearl trail
grim aspen
pearl trail
#

nonono you can't, downgrade to node-fetch 2.x.x

#

import can be only used in es modules

fair axle
#

What should I do?

pearl trail
#

npm i node-fetch@2.6.5

boreal iron
#

You can also require node-fetch async

fair axle
#

again*

pearl trail
#

not a problem 👍

earnest phoenix
#

when opening chests

#

how

#

to get the rarity of that card

quartz kindle
#

array = Object.values(cards)
array[Math.floor(Math.random() * array.length)]

earnest phoenix
#

array = cards.name(cards)
array2[Math.floor(Math.random() * array.length)] ?

#

did i understand it?

quartz kindle
#

no

#

Object.values() is a built in function that converts an object to an array of values

earnest phoenix
#

that works in js?

#

it looks more java than js

#

ohh

#

now

#

i understanded it

quartz kindle
earnest phoenix
#

let a = array = Object.values(cards)
let ab = a[Math.floor(Math.random() * a.length)]

#

like this?

quartz kindle
#

array was the variable name in my example

#

let array = ...

earnest phoenix
#

ik

quartz kindle
#

you can use a if you want

#

no need to use two names

earnest phoenix
#

k

#

@quartz kindle but, it gives a random card, no? how do i obtain that card's rarity and that stuff

#

cards.rarity doesn't work

quartz kindle
#

the card contains it

solemn field
#

hi

#

onine code

quartz kindle
#

card = a[...]
card.rarity

earnest phoenix
#

oh

quartz kindle
#

yes

earnest phoenix
#

thx

quartz kindle
solemn field
quartz kindle
#

what is online code?

earnest phoenix
#

this is the best server for getting help

boreal iron
#

hello online code, im dad
Grandpa is what you should say, Sir

quartz kindle
#

hey i may be old but im not that old

boreal iron
#

According to the average age in here

#

Yes you are, stop resisting

quartz kindle
#

im not even old enough to be these people's dad

#

unless i had them when i was 15

#

or something

boreal iron
#

You dirty, dirty boy KEKW

quartz kindle
#

i didnt even like girls when i was 15

boreal iron
#

lmao nerd

fresh bluff
#

Well i got my Bots Server running

hollow depot
fresh bluff
boreal iron
#

Renaming the message event to messageCreate as the warning says.

fresh bluff
#

Hey guys

#

why can't i submit my bot?

earnest phoenix
earnest phoenix
fresh bluff
#

but wouldn't that clear all my stuff?

earnest phoenix
#

i won't update

earnest phoenix
fresh bluff
#

ima clear my cache

#

wait

#

my log desc is only 119 words

#

it needs to be 300

earnest phoenix
#

oh

#

👍

#

log desc

earnest phoenix
#

its characters

fresh bluff
#

oh god 262 words 1,241 characters

#

but it still does not submit it

flat copper
#

why im getting this error

cinder patio
#

you can no longer import node-fetch this way

flat copper
#

then how?

cinder patio
#
import fetch from "node-fetch"

is the correct way

scarlet cliff
#

import fetch from "node-fetch";

cinder patio
#

you have to enable esm modules though, and also change the extension of all JS files

flat copper
earnest phoenix
scarlet cliff
cinder patio
#

actually I think doing only one thing works too

#

so like, just do "type": "module" but then you'll have to use the import syntax everyone

#

such a mess tbh

flat copper
#

hmm

#

this is just for node-fetch?

earnest phoenix
boreal iron
#

You can also require node-fetch async

spark flint
#

so people can right click a message, and it reports the message to me

#

its a nitro scam report feature

flat copper
# earnest phoenix ..
const { MessageEmbed, MessageButton, MessageActionRow } = require("discord.js")

const fetch = require("node-fetch")
module.exports = {
  name: "animeme",
  aliases: ["anime-meme"],
  group: "anime",
  description: "shows an anime meme",
  clientPermissions: ["SEND_MESSAGES", 
"EMBED_LINKS"],
  memberPermissions: [],
  examples: ["animeme"],
  cooldown: {
    time: 5000,
    message: ""
  },
  nsfw: false,
  run: async(client, message, args) => {
    try {
      let data = await meme()

      const row = new MessageActionRow()
      .addComponents(new MessageButton()
      .setCustomId('refresh')
	    .setStyle('PRIMARY')
	    .setEmoji('🔄'))


      message.channel.send({embeds: [embed(data)], components: [row]}).then(msg => {
        let filter = m => m.user.id === message.author.id

    let collector = msg.createMessageComponentCollector({ filter, time: 90000 });

    collector.on("collect", async i => {
       
      let id = i.customId
      
      if(id === "refresh"){
        let data = await meme()
      msg.edit({embeds: [embed(data)]})
      }
    })

    collector.on("end", () => {
    msg.edit({components: []})
    })
      })
    
    } catch (e) {
      message.error("Something went  wrong ;)..\nError: " + e.message)
      console.log(e)
    }
  }
}```
earnest phoenix
#

Did you try import way?

flat copper
#

yep*

earnest phoenix
#

anyone help me with this

earnest phoenix
#

And add npm start

#

If you dont have

earnest phoenix
flat copper
#

dn

earnest phoenix
#

Did it work?

flat copper
#

yep

earnest phoenix
#

Idk why but node fetch latest giving error on replit

flat copper
#

ye

#

thnx for help

slow ibex
#

So.. what is the best practice for Per-Guild Settings? i mean per-guild prefixes. how can i let it set by only Guild-Admins?

fresh bluff
#

Replit just crashed but my code still runs lol

boreal iron
#

Store them in a database, cache them on startup and update them in both if a user changes the guild config.

slow ibex
#

The whole system is already done... my only thing is the Perms of the usrs

earnest phoenix
#

Use database is better

slow ibex
#

I dont want that random users from a guild change the Prefixes

modest maple
#

Sip so check the user's permissions

earnest phoenix
#

Then save with guild id?

boreal iron
#

Well check the user permission then?

slow ibex
#

Is there a Check for Guild Admins?

earnest phoenix
#

Always was

modest maple
#

user_permissions & admin_flag != 0

slow ibex
#

Hehe.. that solves my problem xD

modest maple
#

note thats just a bitwise AND

boreal iron
#

Get the member permissions as array and check if, for example MANAGE_SHIT includes it.

modest maple
#

normally what ever lib you're using will provide a nicer interface to it

earnest phoenix
#
if(!message.member.permissions.has(Discord.Permissions.FLAGS.ADMINISTRATOR)) return;
modest maple
boreal iron
#

Depends on how much permissions he wanna check.

modest maple
#

mmm Not really

#

Bit flags are used for a reason

#

you can compare multiple flags in a single bitwise op

#

as opposed to doing several lookups

#

😉 Bit flags are cool, look em up

earnest phoenix
#

It take while to search for flag codes

modest maple
earnest phoenix
#

send messages and manage messages = what?

#

You know?

boreal iron
modest maple
#

Not really micro, It's an industry standard

boreal iron
#

ping oldEyes

modest maple
#

because they get stored in 8 Bytes or less and can contain up to 64 unique keys that can be added and removed by a single OP

modest maple
#

the logic becomes

slow ibex
#

Sorry... was migrating my custom Prefix thingy to my master branch

earnest phoenix
#

I mean that its easier to use MANAGE_MESSAGES than using perm.flags = 4729202

modest maple
#
required_flags = (1 << 11 | 1 << 13)
has_perms = user_flags & required_flags != 0
earnest phoenix
#

Okay use how you want

#

It just come easier for me

modest maple
#

if you want to bind to vars you can

#

normally the lib will / should provide that

cinder patio
#

all programming languages should have a built-in bitfield data structure, change my mind

modest maple
#

many would argue that's just either an Enum or the default bitwise ops

#

Like, personally, I've tried using some 3rd party libs for them and just found them to be a bit over abstraction? ig?

cinder patio
#

yeah but what I meant was to make it readable, like C++'s bitfields

modest maple
#

Other than managing serialization and deserialization

earnest phoenix
modest maple
#

pithink Why is that a big int

#

oh wait

#

JS moment

#

mmLol Although I thought the flags were already under 52 bits?

#

39

cinder patio
modest maple
#

so not quite sure why they make that a big int

earnest phoenix
#

What I'm trying to show comes out the same

modest maple
#

Im not sure what you're trying to show but sure

earnest phoenix
#

Discord.Permissions.FLAGS.MANAGE_MESSAGES === user_permissions_flags

modest maple
#

thats... Not how that works

#

That would fail on any user check that has more than the single permission MANAGE_MESSAGES I.e. litterally everyone will fail that check

modest trellis
#

top gg seems buggy

modest maple
modest trellis
#

lol

earnest phoenix
#

To djs guide i dont need the check second permission

modest maple
#

It is, put simple, awfully buggy

#

thats some interesting operator overloading if thats the case

#

Bro that link doesnt work

#

use this

#

that might actually be a link

earnest phoenix
#

before it was cardss.includes but now its different, no?

#
if(card){
//code
}
```?
boreal iron
earnest phoenix
#

there is anything that changes quick.db's db.push comma to other symbols? like: ```js
db.push(cmm_${message.author.id}
db.push(mcm_${message.author.id}

cmm, mcm

What i''d like to make

cmm | mcm

scarlet cliff
#

close your function calls for god's sake

#

and use comments

earnest phoenix
#

is there a way?

#

@scarlet cliff

#

or it's permanent

#

the ,

scarlet cliff
#

idk

earnest phoenix
#

k

earnest phoenix
#

bruh, why does it say cant find file when its there

#

error happesn here

boreal iron
#

log your command var and you will see your issue, btw. it should probably be called folder

#

(or category?! - don't understand your path logic)

lyric mountain
#

2 readFileSync for the same file 😔

earnest phoenix
#

i log it

#

it exists

#

it worked fine but then idk

earnest phoenix
#

its test

versed gulch
#

"silence" Kek

lyric mountain
#

testing doesn't mean using unnecessary steps tho

#

but anyway

#

also, both ifs will fail everytime, //something is not a valid path for anything except network related stuff

earnest phoenix
#

it litearlly worked 15 mins ago

lyric mountain
#

if you say so

earnest phoenix
#

both files are in the same directory

versed gulch
earnest phoenix
lyric mountain
#

and log _dirname

versed gulch
#

Where's the entry file at?

earnest phoenix
#

path is good

scarlet cliff
lyric mountain
earnest phoenix
#

ye

#

its good

lyric mountain
#

couldn't u show the whole path and censor only the private stuff?

earnest phoenix
#

ye wait

lyric mountain
#

like, r\cmds doesn't help much

earnest phoenix
#

is this what u mean

proven lantern
#

how does one change the background picture?

lyric mountain
proven lantern
#

bots are people too

lyric mountain
scarlet cliff
lyric mountain
#

selfuser???!!!!1 zoomeyes

earnest phoenix
lyric mountain
scarlet cliff
# scarlet cliff no

just looking at the request the client sends when you change it, no selfbotting here

lyric mountain
#

when you use bot endpoint to manipulate user stuff it's selfbotting

#

in this case ur using user endpoint to manipulate bot stuff

earnest phoenix
#

js devs dont joke

lyric mountain
#

am not js dev

earnest phoenix
#

good

proven lantern
#

js engineer

#

earnest phoenix
#

y am i even using js

lyric mountain
earnest phoenix
#

it legit shit

proven lantern
earnest phoenix
#

fuck you brendan

proven lantern
#

people try to break the JS language all the time

earnest phoenix
#

its already broken

proven lantern
#

but then they are forced to put their bad ideas into TS

earnest phoenix
#

ctrl z moment

versed gulch
proven lantern
earnest phoenix
#

you wouldnt get it

#

its working like this

#

why, i dont know

versed gulch
#

?

earnest phoenix
#

yes

versed gulch
#

Fantastic, what's the issue

earnest phoenix
#

i dont know

#

ask brendan

versed gulch
#

Lmfao

earnest phoenix
#

i got it

#

if i read the file

#

it crashes

scarlet cliff
lyric mountain
#

ur selfusering kekw

lyric mountain
#

but technically, u can't use automation for anything user-related anyway

#

bcuz that's explicitly against tos

earnest phoenix
proven lantern
#

when AI becomes self aware they wont like these rules

versed gulch
earnest phoenix
lyric mountain
#

I'm pretty sure it's the reason it's failling

#

also u don't need utf-8 for filenames btw

earnest phoenix
#

it just crashes when reading it

#

oh i just realized why xd

#

its file name not full path lmao

lyric mountain
#

btw, use for-each instead of forEach

earnest phoenix
#

imma just rewrite it in cs, fk this language

lyric mountain
#

that's nice too

earnest phoenix
lyric mountain
#

compiler can't optimize forEach as it can with for-each

#

bcuz arrow func

earnest phoenix
cinder patio
#

you mean for-of, not for-each

lyric mountain
#

I don't acknowledge the existance of for-of

boreal iron
#

lol

#

Devil

cinder patio
#

but... there's no such thing as for...each

earnest phoenix
#

even

cinder patio
#

there's for...of, for...in and a normal for loop

boreal iron
#

PHP foreach > any other forEach

lyric mountain
#

for of element

earnest phoenix
#

see, no such bs in normal langs

lyric mountain
#

that's js bullshittery

#

also forof reminds me of farofa

cinder patio
#

...

#
for (const element of array) {
    //code
} 

Maybe you should learn the language before you shit on it

earnest phoenix
#

u cant shit on shit

lyric mountain
#

I do know that exists, still call it for-each

cinder patio
#

then why are you using it

earnest phoenix
#

its easy

#

fast to make stuff

cinder patio
#

so then why are you shitting on it?

earnest phoenix
#

didnt say its good spongerino

lyric mountain
#

btw shux, use annotations instead of relying on dirname to find out which category it is

#

that way u can retrieve all commands annotated by it

#

idk if js has something like that tho

#

java has for sure

#

maybe c# too, since it's a java++

earnest phoenix
#

java on steroids

#

cant even write hello world in java

#

does anyone even use cs for bots here

cinder patio
#

yes

proven lantern
earnest phoenix
#

whatsthat

#

java?

proven lantern
#

js is the most normal language

#

the only thing weird about it is how normal it is

#

JS

earnest phoenix
#

bruh ```js
(node:633) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'rarity' of undefined

#
let card = cards[args.join(" ").toLowerCase()];
let rarity = card.rarity || "Unknown"
#

if there is no arg, the error shows

#

i made a embed with if !args[0] but same

proven lantern
#

what are the keys for cards?

earnest phoenix
#

name: "name", rarity: "rarity", low: "lowercased"

#
 "electro giant": { name: "Electro Giant", rarity: "Epic", low: "electrog" 
#

the embed of args[0] is first of the definition of rarity so idk the error appears

#

the embed shows but the error too

proven lantern
#

what is the args input that causes the error?

#

oh, no args causes the error

#

that makes sense

#
let rarity = card ? card.rarity : "Unknown"```
earnest phoenix
#

k

#

get k'd by anime

proven lantern
#

k

earnest phoenix
#

works 👍

proven lantern
#

success

scarlet cliff
earnest phoenix
#

thx tim now is ultra fast adding cards

#

before it was difficult so i didn't wanted to add cards often

#

but now it's easier

frosty pivot
#

ÑÑÑÑÑÑÑÑÑÑÑÑ

fresh bluff
#

Hey guys how do i uninstall Node on replit? my Node broke

#

like what do i run to uninstall and to reinstall

#

i can't i spent days on my code

eternal osprey
#

Pretty sure that’s fake right?

boreal iron
#

No, it’s not me tho

spark flint
eternal osprey
#

This guy really tried scamming me? Dafuq

lyric mountain
#

wtf fake scamming people

eternal osprey
#

I met him as a customer on fiverr, and he randomly sends this shit

#

His account probably got hacked or sumthinf

spark flint
#

send their ID

eternal osprey
#

Aifht one sec

spark flint
#

i blacklist hacked accounts/nitro scams

eternal osprey
#

Owh no he is not from this server

spark flint
#

as 90% won't get them back and they will be sold and used abusively

eternal osprey
#

He was an old customer of mine

spark flint
eternal osprey
#

865348491819352115

spark flint
#

ty

eternal osprey
#

np

#

Let me know if he’s hacked

spark flint
#

not a valid ID

eternal osprey
#

That’s his id

#

865348491819352115

boreal iron
eternal osprey
#

Yeah, right id for sure

spark flint
#

hmm

#

odd

wheat mesa
#

My bot used to only start up like once every 10 or so tries of me booting it up and I thought it was just a shitty vps... I forgot to await my client run function...

#

I suffered for so long because I’m a moron

boreal iron
#

Brain took damage while working with Java.
That’s irreversible…

#

Poor Waddle

#

_thanks auto correct _

high crown
#

😂

earnest phoenix
#

@eternal osprey 👍 zoomeyes

#

@eternal osprey Kat#6366 👍

marble juniper
#

lol

sturdy vine
#

how can i run an app on gcp in background?

#

linux

scarlet cliff
#

screen

rocky hearth
#

I just started working with djsv13. what is @discordjs/builders?

pearl trail
#

that module will build your slash command easier... so like example:
new builder().setName("name_here").setDescription("description here").toJSON() , it'll return JSON that is needed to register your slash command to discord {"name": "name_here", "description": "description here"}

pearl trail
#

@rose warren hewwo :3 scams above

stiff lynx
#

but now that mongoose findOneAndUpdate is deprecated, what shall we use?

earnest phoenix
#
// findOne...
const guild = await Models.Guild.findOne({ id: context.guild.id });

// ...AndUpdate
guild.members.set(context.user.id, { weeb: true });
await guild.save();
cinder patio
#

there's no updateOne in mongoose?

pale vessel
#

there is

earnest phoenix
#

it is deprecated

#

because .save() is how you should be updating your documents

cinder patio
#

so you will be doing two database requests instead of one... ok then 😩

pale vessel
#

Neither findOneAndUpdate nor updateOne is deprecated?

earnest phoenix
#

huh

earnest phoenix
#

it's a problem with an old version of mongoose

errant flax
#
const express = require("express")
const app = express()
const server = require("http").createServer(app)
const io = require("socket.io")(server,{ cors: { origin: "*" } })
const DiscordAuth = require("disc-auth.js")
const config = require("./config.json")
const defObj = {
  cdns: config.cdns
}

app.use(require("cookie-parser"))
app.set("view engine","ejs")

app.get("/",(req,res)=>{
  console.log(req.cookies)
  res.render("not-av",{...defObj})
})

server.listen(2000,()=>console.log("Server Running . . ."))

io.on("connection",(socket)=>{
  console.log("Connected "+socket.id)
})

Page wont load or anything when i go the the url that is hosted on

#

help bonk

earnest phoenix
#

when object reference problems make you detach the state from the component :(

earnest phoenix
# cinder patio clone it

the problem is:

useEffect(_ => {
  socket.on("message", msg => {
    console.log(messages);
    updateMessages([...messages, msg]);
  })
}, []);

the value of messages never changes

earnest phoenix
scarlet cliff
#

what does useeffect do?

errant flax
#

i cant rlly explain much but

#

it makes like u can display things from an object given

#

like ...defObj

earnest phoenix
scarlet cliff
#

componentDidMount()?

earnest phoenix
#

yes

#

but for function components

scarlet cliff
#

o

#

kool

errant flax
scarlet cliff
#

why are u using express this way

#

just do app.listen

earnest phoenix
#

they're using websockets too

errant flax
#

^

scarlet cliff
#

oh its on the same server

earnest phoenix
#

which don't work with regular express + it's socket.io

scarlet cliff
errant flax
#

for a project im building misosface

#

like it makes it possible to make a real time chat app for example

#

like the client side can communicate to the server side etc. etc.

earnest phoenix
#

I remember using vanilla websockets
it was horrible
or maybe it was just typescript or deno fucking up

errant flax
earnest phoenix
scarlet cliff
#

ok

errant flax
#

can anyone help me why it isnt sending something back reeeee

scarlet cliff
errant flax
#

wdym?

scarlet cliff
errant flax
#

??

scarlet cliff
#

my kek emoji is gone

#

i cry

errant flax
#

wym by "its socket.ik"

#

.io*

scarlet cliff
#

yeah

errant flax
#

??

earnest phoenix
#

why do people shit on stuff for no reason

#

(python obviously sucks and im allowed to hate on it)

errant flax
sacred aurora
errant flax
#

just realized the cookie-parser module was the issue

#

and i just needed to call the function when requiring that module

sacred aurora
#

mhmm

scarlet cliff
#

dum bass

errant flax
#

u cant blame me
i thought i already called it

earnest phoenix
#

I'm reading replit docs for authentication
where tf does the user data go after authenticating???

#
<script authed="location.reload()" src="https://auth.turbio.repl.co/script.js"></script>
slow dragon
earnest phoenix
#

ok i found it

req.headers["x-replit-user-name"]
errant flax
#

im interested :misosface:

earnest phoenix
#

i don't know how to word this question so i'm sorry if it makes no sense but

#

within this form, i want the user to be able to enter their mysql credentials as many times as they like on this page without having to restart the server

#

what currently happens is if they enter their credentials wrong or some other fatal error happens, when they go to submit their credentials again, this error gets logged to the console:

#

how do I fix this?

#

if necessary, i can provide the code:

/////////////////////////////////////////////////////
//                                                 //
//                     BTS Bot                     //
//                                                 //
//               File: checkMySQL.js               //
//                                                 //
//         Written by: Thomas (439bananas)         //
//                                                 //
// Copyright 439bananas 2021. All rights reserved. //
//                                                 //
/////////////////////////////////////////////////////

const log = require('../core/logHandler');
const mysql = require('mysql');

var connection; // Apparently this needs to be declared prior to the function to prevent overloading with event listeners
function checkmysql(hostname, username, password, database) {
    if(!connection) { // See first comment
        connection = mysql.createConnection({
            host: hostname,
            user: username,
            password: password,
            database: database
        });
        connection.on('error', function(err) { // If there's an error, log and handle it, don't crash
            log.error(err);
        });
    }
    return new Promise(function(resolve, reject) { // Rejections/resolutions will be returned to the called
        connection.connect(function (err) { // POOL ONLY CONNECTS USING FIRST ENTERED CREDS, THIS IS BAD. INVESTIGATE NOW
            if (err) {
                //console.log(err)
                if (err.code == 'ER_ACCESS_DENIED_ERROR') { // Reject with various errors based on what the server returns
                    reject('INCORRECT_CREDENTIALS');
                } else if (err.code == 'ER_DBACCESS_DENIED_ERROR') {
                    reject('ACCESS_DENIED');
                } else if (err.code == 'ECONNREFUSED' || err.code == 'ENOTFOUND') {
                    reject('CONNECTION_REFUSED')
                } else {
                    reject('UNKNOWN_ERROR');
                    log.error(err)
                }
            } else {
                resolve('OK') // If blow test successful, return OK
            }
            //connection.destroy()
        });
    });
}

module.exports = checkmysql;```
#

I can't help with mysql but dude this looks sick

sinful night
#

@drowsy crag

earnest phoenix
#

someone i know called it ostentatious

earnest phoenix
#

looks like nom is ignoring pings

#

i took the idea from dave plummer and the format from a minecraft modder so thank him

sinful night
#

@rustic nova

quartz kindle
#

once it exists it will not set it again, because connection already exists

#

if you want to redefine the credentials without restarting the process, you need to close the connection and clear the connection variable

earnest phoenix
#

so i declare connection by itelf within the function right?

#
function checkmysql(hostname, username, password, database) {
    var connection; // Apparently this needs to be declared prior to the function to prevent overloading with event listeners
    if(!connection) { // See first comment
        connection = mysql.createConnection({
            host: hostname,
            user: username,
            password: password,
            database: database
        });
        connection.on('error', function(err) { // If there's an error, log and handle it, don't crash
            log.error(err);
        });
    }
    return new Promise(function(resolve, reject) { // Rejections/resolutions will be returned to the called
        connection.connect(function (err) { // POOL ONLY CONNECTS USING FIRST ENTERED CREDS, THIS IS BAD. INVESTIGATE NOW
            if (err) {
                //console.log(err)
                if (err.code == 'ER_ACCESS_DENIED_ERROR') { // Reject with various errors based on what the server returns
                    reject('INCORRECT_CREDENTIALS');
                } else if (err.code == 'ER_DBACCESS_DENIED_ERROR') {
                    reject('ACCESS_DENIED');
                } else if (err.code == 'ECONNREFUSED' || err.code == 'ENOTFOUND') {
                    reject('CONNECTION_REFUSED')
                } else {
                    reject('UNKNOWN_ERROR');
                    log.error(err)
                }
            } else {
                resolve('OK') // If blow test successful, return OK
            }
            connection.destroy()
        });
    });
}```
#

ooooo ok thanks

#

what test

#

lol basically if everything goes well with pinging the mysql server then return ok

#

blow test is DROP table users

#

blow up the database

rocky hearth
#

can somebody help with this?

woeful pike
#

also don't reject strings

#

bad: reject('Something went wrong')
better: reject(new Error('ERROR_CODE'))

#

Errors contain stacktraces, if you throw strings you have no idea where the error came from

earnest phoenix
#

how can i get the image?

#

like

#

this link's image

#

it shows a image

#

how do i get that image?

earnest phoenix
#

not copying

#

i want to get it with the bot

#

is it possible?

solemn latch
#

sure, look at the sites meta tags for it

earnest phoenix
#

ok

earnest phoenix
solemn latch
#

make a request to the url, check the meta tags

earnest phoenix
#

how

wheat mesa
#

Perhaps you should look up how to query a website for html data 😛

solemn latch
#

how what, how to make a request, or how to check the meta tags?
what programming language, how are you getting the url, what type of tags do you want to support, and any other relevant information needs to be provided.

earnest phoenix
#

both

wheat mesa
#

I need to learn how to write HTML parsers

#

Sounds like a fun project

solemn latch
earnest phoenix
#

first 5

solemn latch
#

ok, answer the rest please 👀

earnest phoenix
#

👀

#

all 5

solemn latch
#

im not sure what that means

wheat mesa
#

That... wasn’t the question

solemn latch
#

all 5 programming languages?

#

kek

earnest phoenix
#

idk

wheat mesa
#

I don’t think he can guess what tags you want and what programming language you’re using

earnest phoenix
#

better i make a json with all the data

solemn latch
#

json of html data?

#

probably not

earnest phoenix
#

json

#

i'm not making website

solemn latch
#

json of?

earnest phoenix
#

bruh

solemn latch
#

you are making a request

wheat mesa
#

Parse the data from the html, then you could throw that in a json if you need to for some reason

earnest phoenix
#

nah i won't do it

#

thx anyways

#

see ya in a hour

solemn latch
#

just to clarify, we are not assuming you are making a website(not sure where you got that from).
We are wanting you to do this, but programmatically.
https://i.woo.pics/2ea45c0b57.mp4

This is the same basic method twitter, facebook, and discord uses to get that information from websites.

errant flax
#

clash royale brings back memories pd_wheeze

tardy hornet
#

my slash command isnt showing up

rose warren
#

Does your bot have the applications.commands scope?

#

In the server

tardy hornet
#

it suppose to be globally

rose warren
#

Yeah but it won't appear if you didn't invite your bot with the applications.commands scope.

tardy hornet
#

o okay and how exactly do i do that?

rose warren
#

In your invite link include the applications.commands scope.

fallow harbor
#

I get "has is not defined" when someone without perms executes the command

const { Client, Message, MessageEmbed } = require('discord.js');

module.exports = {
    name: 'kickeeee',
    /** 
     * @param {Client} client 
     * @param {Message} message 
     * @param {String[]} args 
     */
    run: async(client, message, args) => {

        if (!message.author.permissions.has(`KICK_MEMBERS`)) {
message.channel.send("user has kick perms, cant kick them")
return;
}

            message.mentions.members.first().kick().then((member) => {
                    msg.channel.send("Get yeeted" + member.displayName + " . Haha yes I kicked that guy");
                }).catch(() => {
                    message.channel.send("There was an error. This could have been caused by:\nThe user has a role higher than mine.\nMember who tried to kick does not have sufficient permissions.\nI do not have sufficient permissions.");
                });
          }}```
solemn latch
#

has is not defined, or you cannot use has on undefined?

fallow harbor
solemn latch
restive nacelle
#

Would anyone like to help me make a Grammarly bot for discord? (Idk what else to make, one of my friends suggested this)

spark flint
#

As bots can’t edit other peoples messages

scarlet cliff
#

my tab size didnt change

earnest phoenix
#

@solemn latch

#

thanks

scarlet cliff
#

how to vertically align text depres

quartz kindle
#

you want vertical centering?

#

you need to make the parent height 100% or 100vh

#

doesnt matter

feral aspen
#
let jobs = ['member', 'helper', 'moderator'];
let myJobs = ['member', 'helper'];
let toBuy = 'moderator';

let lastJob = myJobs[myJobs.length - 1];

So, I'm trying to figure out how I can check if the user has the previous job before buying another job.

#

Example, when he buys moderator, I need to check if he bought helper before it.

earnest phoenix
#

with .find

#

or you can get the index with .indexof

feral aspen
#

What? How am I going to be using them in my situation, I mean I know I'll be using .find() but to search what exactly, since I'm confused.

quartz kindle
#
let jobs = ['member', 'helper', 'moderator'];
let myJobs = ['member', 'helper'];
let toBuy = 'moderator';

let index = jobs.indexOf(toBuy);
let hasPrevious = myJobs.includes(jobs[index-1]);
feral aspen
#

OH WAIT.

#

My bad.

earnest phoenix
#

how do I get a random number between 80 & 40 bc this gives me 100 sometimes, I want like if it's less than 40 it'll change it to 40

  let amount = Math.floor(Math.random() * 80) + 40;
quartz kindle
#
      • 40
earnest phoenix
#

ok

#

it should be a random number between 40 and 80?

quartz kindle
#

yes

earnest phoenix
#

with that?

#

ok

#

and 2300-2500?

feral aspen
#

I say MongoDB can be a good start.

#

I'd like to ask, why when I console log some arrays, some return different design of outputs.

severe perch
feral aspen
#

I never used it honestly, so I am not sure if it is good or not. 🤷‍♂️

quartz kindle
#

yes its good

#

An SQLite database is limited in size to 281 terabytes (2^48 bytes, 256 tibibytes). And even if it could handle larger databases, SQLite stores the entire database in a single disk file and many filesystems limit the maximum size of files to something less than this.

earnest phoenix
#

does ntfs have a limit?

cinder patio
#

you think you'll store more than 281 terabytes of data??

quartz kindle
#

each sqlite database is a single file, if you want multiple files you can run multiple databases

quartz kindle
# earnest phoenix does ntfs have a limit?

Maximum disk size: 256 terabytes
Maximum file size: 256 terabytes
Maximum number of files on disk: 4,294,967,295
Maximum number of files in a single folder: 4,294,967,295

earnest phoenix
#

Imagine backing up 256 tb

quartz kindle
#

exfat:

Max. volume size c. 128 PB, 512 TB recommended
Max. file size c. 128 PB (theoretical 16 EB–1)
Max. number of files up to 2,796,202 per directory
Max. filename length 255 characters

#

linux ext4:

Max. volume size 1 EiB (for 4 KiB block size)
Max. file size 16 TiB (for 4 KiB block size)
Max. number of files 4 billion (specified at filesystem creation time)
Max. filename length 255

earnest phoenix
#

whats the biggest limit on the filesystems

cinder patio
#

your hard disk 😎

scarlet cliff
#

what about my soft disk

earnest phoenix
#

so 300gb is the biggest limit?

cinder patio
#

or SSD

quartz kindle
#

300gb is nothing

grim aspen
#

depends on the hard drive

earnest phoenix
grim aspen
quartz kindle
#

ReFS:

Max. volume size 1 yobibyte (2^80 bytes)
Max. file size 16 exbibytes[citation needed] (2^64−1 bytes)

scarlet cliff
#

what about terry's fs?

cinder patio
#

yobibyte oldEyes

scarlet cliff
#

idk the name

quartz kindle
#

ReFS was designed to overcome problems that had become significant over the years since NTFS was conceived, which are related to how data storage requirements had changed. The key design advantages of ReFS include automatic integrity checking and data scrubbing, elimination of the need for running chkdsk, protection against data degradation, built-in handling of hard disk drive failure and redundancy, integration of RAID functionality, a switch to copy/allocate on write for data and metadata updates, handling of very long paths and filenames, and storage virtualization and pooling, including almost arbitrarily sized logical volumes (unrelated to the physical sizes of the used drives).

#

good shit

grim aspen
#

2-16 terabytes for a hard drive is the max

cinder patio
#

come on now who's gonna use up 1 yobibyte

grim aspen
#

if it's windows 10

quartz kindle
#

games n stuff

grim aspen
#

@solemn latch

#

anyways where were we

cinder patio
#

There isn't a storage medium which can store 1 yobibyte of data sooo yeah

quartz kindle
#

you just need 10 billion 100tb ssds

#

:^)

scarlet cliff
cinder patio
#

and a motherboard which can handle 10 billion 100tb ssds :^)

feral aspen
#

What's the regex to take out an emoji from a string?

#
let channel = "🔒general";
let emoji = '';

function locking() {
  console.log(channel.match(//))
};
restive nacelle
#

does anyone have ideas on what bot to make?

hot sleet
#

is this 60 mins ?

stable eagle
scarlet cliff
#

depends

feral aspen
#

👀

hot sleet
stable eagle
#

Ye

hot sleet
#

...

#

how did you know ?

stable eagle
#

I used ms

hot sleet
#

oh ms

wheat mesa
#

Because 604.8 seconds = 10 minutes

stable eagle
#

60 minutes is 3600000

#

You just need to google

hot sleet
#

hell

#

i thought its just time stamp

#

whatever in my dashboard i need to use this token once

earnest phoenix
#

oh sqlite files have 140TB of storage

graceful gulch
#

ayo

#

guys

#

python

#

help

#

pls

feral aspen
#

Yikes.

scarlet cliff
#

kek

graceful gulch
#

im making a wait_for function but like i want to check if its the right answer bot if its not it says incorrect and yes i know the bot.wait_for("message", check=check)

#

help

#

pls

earnest phoenix
#

so discord won't make sounds of messages now?

#

then i can enable my sound, i disabled the message sound from discord but it re-enables in 1 day or 2 days

graceful gulch
#

dude

scarlet cliff
#

you're*

graceful gulch
#

i really dont care

#

lol

versed gulch
fleet lion
#

Is it possible to pick another region for Cloudflare Workers?

jagged heart
#

on discord.py, how can i make my bot dm a user if they say something in a certain list of phrases? so far i have
if any(word in msg for word in dm_user):
but i can't work out how to get the bot to dm the user something when the certain phrases are sent

scarlet cliff
flat copper
#

how can i convert this to JSON?

boreal iron
#

By converting the buffer to a string in the first place

flat copper
boreal iron
#

toString()

flat copper
#

can i write this all to .txt file?

boreal iron
#

What are you trying to do at all?

flat copper
#

transcript command

boreal iron
#

Write the CSS part into a CSS file and include it into your HTML script

flat copper
#

how
im new to js
sry.

boreal iron
#

Is this your string you got from the buffer?

flat copper
#

yep

boreal iron
#

Then try to write the whole content to a HTML file using fileSync

#

(assuming you’re using nodejs)

flat copper
#

yep

#

after writing it how can i send that to user?

feral aspen
#

How can I remove an emoji from a string?

#

Should I use a regex?

scarlet cliff
#

.replace

feral aspen
#

👍

flat copper
#
await fs.writeFile("trans.html", file, err => {
        if(err){
console.log(err)
} else {
          console.log("dn")
}
      })
boreal iron
#

Writing it to the user? You mean sending it via Discord? If so send it as attachment

flat copper
#

yep

outer atlas
#

I love discord bots when u make some mistakes

#

like play url of radio 😄

feral aspen
#

😂

outer atlas
#

and if i put the radio in url this now full crash of codes

#

and lucky i have back up codes onyle i hope backup codes still works if theres no erros coming out :/

#

ye

#

I need start over

#

i really dont nou yet what error this is when u use command of play this joining and channel saying music start onyle bot leaves some resson

#

and i can't find in codes why?

#

This is resson ever time if i found some stupid thinks about the bot i really love to trun it off when i still in queue of top.gg 😄

wheat mesa
#

What