#development

1 messages Β· Page 1435 of 1

earnest phoenix
#

oh shit that pinged a dude

wind vault
#

No

earnest phoenix
#

sorry

#

lmao

strange viper
#

oof

wind vault
#

Β°avatar

sudden geyser
#

Your issue isn't the program. It's how you ran the command.

You probably ran the command like *avatar instead of *avatar @Luca#0001

earnest phoenix
#

well u need to provide a user to get the avatar of

strange viper
# wind vault Β°avatar

See that's your problem, the code you're using requires you to mention someone with the command

wind vault
#

See

strange viper
#

(and that kids is why we don't copy/paste from stack overflow ! )

earnest phoenix
#

Well i mean he probally should fix his program to not error out when someone forgets a parameter

#

idk what u mean

sudden geyser
earnest phoenix
#

copying and pasting is perfectly fine as long as u know what ur doing lmao

wind vault
#

Ooooh yeah

#

Thanks

#

This is the problem

tranquil flare
#

hi

earnest phoenix
#

If u hate copying and pasting so much that you go and write your own regexps your fucking crazy

wind vault
#

It worked

#

@strange viper Thanks you

#

Thanks to all the world

sudden geyser
#

When people say to not copy & paste, they're really saying to not copy & paste blindly.

wind vault
#

I'm going to bother you because I'm just a programming apprentice

strange viper
drifting wedge
#

whats the js replace function?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

drifting wedge
#

whatever

#

how do i replace stuff

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

its a js function which accepts regex

drifting wedge
#

x.replace doesnt work

#

ik

#

i did that

#

but didnt help

#

x.replace not a func

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

spare goblet
#

is x a string

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

drifting wedge
#

ye

#

ik

#

ik how replace works

spare goblet
#

is x a string

drifting wedge
#

yes

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

show what you're doing

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

smh close bracket

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

drifting wedge
#
function print_final() {
    var x = document.getElementById("input1").value;

    x = x.toLowerCase;
    x = x.replace("a", "n");
    x = x.replace("b", "o");
    x = x.replace("c", "p");
    x = x.replace("d", "q");
    x = x.replace("e", "r");
    x = x.replace("f", "s");
    x = x.replace("g", "t");
    x = x.replace("h", "u");
    x = x.replace("i", "v");
    x = x.replace("j", "w");
    x = x.replace("k", "x");
    x = x.replace("l", "y");
    x = x.replace("m", "z");
    x = x.replace("n", "a");
    x = x.replace("o", "b");
    x = x.replace("p", "c");
    x = x.replace("q", "d");
    x = x.replace("r", "e");
    x = x.replace("s", "f");
    x = x.replace("t", "g");
    x = x.replace("u", "h");
    x = x.replace("v", "i");
    x = x.replace("w", "j");
    x = x.replace("x", "k");
    x = x.replace("y", "l");
    x = x.replace("z", "m");

    document.getElementById("final_encrypt").innerHTML = x;

}```
spare goblet
#

oh my lord

drifting wedge
#

sorry for codeblock

earnest phoenix
#

lord have mercy

#

lmao

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

i've never seen such inefficient code in my life

sage bobcat
#

One message removed from a suspended account.

drifting wedge
#

im learning OK!

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

cringing

earnest phoenix
#

soooo ummmmm someone want to tell him what regex is lmao

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

this turns it to a function

drifting wedge
#

my brother has like this thing where its his homework to do this

#

so im making it before him

#

to make fun of him

spare goblet
#

you need to do x.toLowerCase() instead

sage bobcat
#

One message removed from a suspended account.

spare goblet
#

and itll work

#

but holy crap, cringe

drifting wedge
#

ALMOST!

sage bobcat
#

One message removed from a suspended account.

drifting wedge
#

worked!

#

pog

earnest phoenix
#

out of all the languages to do that type of thing in

drifting wedge
#

alr luv u all

earnest phoenix
#

and you chose js

#

lmao

drifting wedge
#

firstly

#

also im learning js

#

i do python already

earnest phoenix
#

ah yeah it is a website

spare goblet
#

i mean

earnest phoenix
#

i didn't see document

#

makes sense

spare goblet
#

in

earnest phoenix
#

lmao

spare goblet
#

A N Y

#

language you shouldn't do that

drifting wedge
#

what?

earnest phoenix
#

yeah you should A use a regex

spare goblet
#

it doesn't matter what language lool you don't do that

drifting wedge
#

the replace thing?

earnest phoenix
#

B you could use an array for mappings

spare goblet
#

500 lines of code replacing things

drifting wedge
#

i couldnt think of another way though

spare goblet
#

if i was too lazy to use regex i wouldve used an object

earnest phoenix
#

I would have done a mapping array

#

too lazy for objects

#

one large ass json file here i come

#

lmao

spare goblet
#

i stan large configs tbh

drifting wedge
#

i mean how would i have done it more efficiently?

#

like the replace thing?

#

i need to shift the chars 13 +

#

so like a -> n

#

etc

spare goblet
#

iterate through each character

#

and add to a new string

#

is what i would do

drifting wedge
#

like for example

#

iara > iaea

#

wait

#

thats not supposed to happen

sudden geyser
#

You want to shift all letters by 13 (a => n, b => o, etc.)?

spare goblet
#

x = x.split("")
let newStr = ""
for ( const char of x ) {
newStr += "im not really sure of ascii / code stuff, so you'll have to find a way to convert char to 13 characters ahead, there's probably some unicode thing for that if you google it"
}

earnest phoenix
#
something like:
mapping = ["a" => "n", "b" => "o"]
str = "test string"
for (let i = 0; i < str.length; i++) {
  str[i] = mapping[str[i]]
}```
spare goblet
#

is how i'd do it, itll probably be like 5 lines of code if you do it properly

shy turret
#

pretend i declare a global variable like

sudden geyser
#

o that is what you want to do

shy turret
#

module.exports.thisvar = THISVARIABLE

drifting wedge
#

i dont do smort

earnest phoenix
#

lmao

sudden geyser
#

What you want to do actually isn't that hard

spare goblet
#

then just use an array of abcs

shy turret
#
THISVARIABLE = 1;
module.exports.thisvar = THISVARIABLE;
THISVARIABLE = 2;

would it output 1 or 2

spare goblet
#

find the index in the array

shy turret
#

if i require() it

spare goblet
#

then calculate

#

😳

earnest phoenix
#

@shy turret shouldn't

shy turret
#

if it's 2, it shows the current state of the variable

sudden geyser
#

You'll need the unicode point for the start, and the modulo operator to make sure it doesn't go over 26

shy turret
#

which is what i want

#

does it though it my question

earnest phoenix
#

i don't do much js but i don't think it the global var would make a pointer to the local one

#

let me test

drifting wedge
#

wait

#

its not even working

spare goblet
#
x = x.split("")
let newStr = ""
const alphabets = [ "a", "b", ... ]
for ( const char of x ) { 
    let i = alphabets.indexOf(x) + 13
    if( i > 26 ) { 
        i -= 26
    }
    newStr += alphabets[i]
}```
#

this would probably work

#

but i haven't tested it

drifting wedge
#

lemme yoink rq

spare goblet
#

and fill in the array ty

#

oh wait

#

sry

#

ah perfect

earnest phoenix
#

@shy turret ^^

shy turret
#

oof

#

i guess i need to make it a function to show the latest

earnest phoenix
#

references could be used here if u really wanted

#
var foo = { x: 5 };
var refFoo = foo;

// foo.x => 5
// refFoo.x => 5

foo.x = 6;

// foo.x => 6
// refFoo.x => 6```
#

taken from stack overflow

#

cause im lazy

drifting wedge
#

this just spits it

#

split

#

@spare goblet

spare goblet
#

the new string is newStr

earnest phoenix
#

lmao

spare goblet
#

do you even understand my code

#

if you don't

#

don't use it

#

cuz that means i just spoonfed you and you still don't get it Facepalm

drifting wedge
#

when u do this

#

x.split("")

#

you split each arg

#

ye?

spare goblet
#

o wait i made a typo

#
let x = "owouwu"
x = x.split("")
let newStr = ""
const alphabets = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"  ]
for ( const char of x ) { 
    let i = alphabets.indexOf(char) + 13
    if( i > 26 ) { 
        i -= 26
    }
    newStr += alphabets[i]
}
#

now it should work

#

uwu

drifting wedge
#

wait i wanna understand it tho

spare goblet
#

x.split("") turns "owouwu" to [ "o", "w", "o", "u", "w", "u" ]

drifting wedge
#

why let not var?

spare goblet
#

cuz var is gross

earnest phoenix
#

hehe

spare goblet
#

let i because it's only used in that scope

drifting wedge
#

wat did u change?

earnest phoenix
#

i hate that since i love C#, but i love it in js

spare goblet
#

i did indexOf(x) by accident sry

drifting wedge
#

for ( const char of x ) { // for loop for each character

#

for char in x

#

im smort!

sudden geyser
#

@drifting wedge this is a messy function I wrote, but it sort of does the job: ```js
function shift(str, shift) {
let start = "a".charCodeAt(0);

return [...str].map((letter) => String.fromCharCode((letter.charCodeAt(0) + shift) % start + start));

}```

spare goblet
#

i stan efficient code

sudden geyser
#

no efficient code

#

only spaghetti here

drifting wedge
#

joking ofc

#

thanks for the help all!

sudden geyser
#

grr

earnest phoenix
#

small doesn't always mean efficient, but we will go with it

#

lmao

spare goblet
#

i stan ppl who understands unicode mess

#

i dont understand unicode ordering character things

#

have to make do with smolbrain

sudden geyser
#

try making every letter in a string lowercase without using .toLowerCase()

earnest phoenix
#

iteration hehe

spare goblet
#

gross

spare goblet
#

clownery

sudden geyser
#

just 1.1m more points to go

drifting wedge
#

.replace.replace.replace........

#

so like this final func?

sudden geyser
#

actually I was wrong

#

2,155

drifting wedge
#
function print_final_de() {
    let x = document.getElementById("input2").value;
    x = x.split("")
    let newStr = ""
    const alphabets = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"  ]
    for ( const char of x ) { 
        let i = alphabets.indexOf(char) + 13
        if( i > 26 ) { 
            i -= 26
        }
        newStr += alphabets[i]
    }
    document.getElementById("final_decrypt").innerHTML = x;
}```
spare goblet
#

i hate raw web js

drifting wedge
#

flask is way better

spare goblet
#

its so gross

#

but i hate jquery even more

#

with such extreme passion

drifting wedge
#

uh tbh i still didnt really understand it but i understand the idea

#

its still borken, but imma try to big brain it?

#

is it possible to bigbrain it?

spare goblet
#

how is it broken

#

wiat il seeplxian

#

ill explain

drifting wedge
#

well its returning the same thing

#

with ,

spare goblet
drifting wedge
#

so its returning split text

sudden geyser
#

the web sucks

spare goblet
#

lmao

sudden geyser
#

why can't we go back to black screen terminal

drifting wedge
#

is it the same proccess to go backwards?

#

isnt it let i = aplha.indexof(char) - 13

#

instead of +?

#

im going back

#

but then id run into the issue of there not being alphabet left

#

it would have to be a loot]

#

loop

spare goblet
#
x = x.split("") // x is now an array of each letter in the string
let newStr = "" // an empty string
const alphabets = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"  ]
for ( const char of x ) { // for each element of the array x, or each character of the original string,
    let i = alphabets.indexOf(char) + 13 
// to find the index in the original array of alphabets, then add 13. this would return the new number it would allegedly "shift to". however, for alphabets like y, it would be larger than 26, and there's only a total of 26 alphabets, SO...
// if it's more than 26,
    if( i > 26 ) { 
// remove 26 from the index so that it shifts back to the beginning of the array.
        i -= 26
    }
// add that new shifted character to the new string newStr, then continue the loop.
    newStr += alphabets[i]
}

// when the loop ends, that means newStr is fully defined.
#

hope this explains it well

drifting wedge
#

so if i go to -alphabet it goes to z

earnest phoenix
drifting wedge
#

GG!

spare goblet
#

congrats .. barnie

earnest phoenix
#

Thx!

sudden geyser
#

I think .split("") performs weird on some unicode. Some people usually just do [...x]

drifting wedge
#

is it possible to make a list looped?

#

so if i do -1 it goes to end of list?

spare goblet
#

smh py dev

sick sluice
spare goblet
#

i have no idea what you mean exe

sick sluice
spare goblet
#

put it in a code block

drifting wedge
#

so it should go backwards

spare goblet
#

``` before and after the msg

drifting wedge
#

so it would go what u put, but -13, so it would go back to normal

spare goblet
#

O

drifting wedge
#

it works

#

but now if i do some ones it breaks

spare goblet
#

you have to do

#

if ( i < 0 ) {
i += 26;
}

#

instead of i > 26

drifting wedge
#

whats Nan in js?

spare goblet
#

ig

#

its invalid number

#

or more so

#

invalid value

sick sluice
spare goblet
drifting wedge
#

bruh

#

tysm

#

i gotta legit learn this stuff

#

im decent with py honestly

#

but i couldnt do stuff from srarch

#

like i need a template kinda u now

#

like i dont know how to do classes

#

i understand them kinda

#

but not too well

spare goblet
#

classes are like

#

defined object makers

drifting wedge
#

i know that

#

but like for example i dont know how to code a class

#

like how to make the actual code

spare goblet
#

wdym

drifting wedge
#

or like for flask for example

#

like i couldnt MAke a class from my head

#

like i code, with my pre existing code

#

which isnt a good habit

spare goblet
#

class className {
constructor()
}

drifting wedge
#

ik ik

#

i mean py

#

like i know coding ofc

spare goblet
#

its the same

drifting wedge
#

ik

spare goblet
#

concept in both js and py

#

πŸ˜”

drifting wedge
#

i know the concept

spare goblet
#

real talk tho exe

drifting wedge
#

ye?

spare goblet
#

if i was 13 years old like u

#

and knew how to code

#

as well as u do

#

i'd be hella proud lol

drifting wedge
#

lmao

#

lemme dm u somethying

#

cuz it might doxx me a bit and dont wanna be too out

spare goblet
#

oh

#

yikes

#

pls dont

drifting wedge
#

just a bit

spare goblet
#

LOL

drifting wedge
#

lmao

#

alr

spare goblet
#

pls dont doxx urself

drifting wedge
#

not doxxing myself basically lmao

spare goblet
#

pog

drifting wedge
drifting wedge
#

umm

#

like i mean tho, i know how to code ofc

#

but i dont know how to CODE a lot of stuff

delicate shore
#

Guys

drifting wedge
#

like lemme give u example

delicate shore
#

I need to ask a question

#

I am making a music bot

drifting wedge
#

this is a class in py

#
    def __init__(self,client):
        self.client = client```
#

i know how it works

#

but i couldnt make one from my head

#

like i dont remember it

spare goblet
#

throwback to when i was accepted to an ivy league but declined, cough

drifting wedge
#

but thats what google's for

spare goblet
#

oh

#

like, syntax

drifting wedge
#

ye

#

i know most syntax tho

delicate shore
#

I want to add a 15 minutes everyday limit to listening song in my bot

#

Once they cross 15 mins limit it'll say - Go back to work

drifting wedge
#

like 25 mins

#

15 is too little lmao

#

jk

#

so dpy?

#

or some bad lang?

delicate shore
#

It's a private bot for some company

#

they said 15 mins

#

So their employees can take a break when they are bored

delicate shore
drifting wedge
#

WHAT FUCKING LANGUAGE

#

oh

#

cant help ya there

spare goblet
#

LOL

delicate shore
#

Ok :(

spare goblet
#

after 15 mins it goes GO BACK TO WORK

#

LMFAO

#

that's hilarious ok

drifting wedge
#

the only thing ive made in js is a bot that spamms elmo hell memes

spare goblet
#

just make a timer thing

delicate shore
#

How

drifting wedge
#

if u say: "no" it says i dont do consent

#

and if you say "What" is says stfu weeb

#

so very nice bot

#

its in 0 servers!

spare goblet
#

theres multiple ways

drifting wedge
#

prob a timer module?

spare goblet
#

but the easiest and probably least efficient way is using settimeout

#

LOL

drifting wedge
#

py is so much better

#

i made a full out music thing in like 500 lines

#

with db and all

#

ezpz

spare goblet
#

setTimeout(() => {
// end music
// yell at them and tell them to go back to work
}, 900000)

drifting wedge
#

aight well being a child has many perks, but one disadvantage is sleep time

#

so gtg sleep

#

cya nerds

#

gn iawa

delicate shore
#

I want it to give them 15 mins daily
But they can just run command again

spare goblet
delicate shore
#

But I don't want that

spare goblet
#

Oh

#

then do that as well as

delicate shore
#

15 mins daily
The company said

spare goblet
#

if they already had their 15 mins

#

then tell them to stop hellno

drifting wedge
spare goblet
#

just put it in the db

drifting wedge
#

or just tell them to use my bot

spare goblet
#

LOOL

drifting wedge
#

i have 16 min time outs

#

instead of 15

#

get tekt

#

rekt

delicate shore
#

But 15 mins separate

drifting wedge
#

tmr wanna see: support group for abused employees in bot join logs

drifting wedge
#

so i dont see why u would limit it

#

anyways, good night! cozy_fire uwuslep

delicate shore
#

Gn

spare goblet
#

the way i'd code that

#

would depend on

#

the scalability of the bot

#

like if itll have to scale to 100k servers

drifting wedge
#

Can I share a server name my bot is in?

#

If I change it a bit

#

I have a list of really funny ones

spare goblet
#

if it does have to scale to 100k servers, i'd use a redis caching
map it by user and the amount of milliseconds left for that day
then set that caching to expire every 24h

delicate shore
drifting wedge
#

yep

#

Logged off in dev

#

So that's why

delicate shore
drifting wedge
#

Oopsie

spare goblet
#

i dunno

delicate shore
#

I'm talking about my bot

spare goblet
#

your usage scenario lol

drifting wedge
#

What's the point of caching?

spare goblet
#

my bot is at 140k servers

drifting wedge
spare goblet
#

to avoid overloading ur db

delicate shore
#

Damn

drifting wedge
#

Mines in 500

delicate shore
#

My bot is in 1300 only

drifting wedge
#

So I'm fine

earnest phoenix
#

can i get some help?

delicate shore
#

don't ask to ask

#

Just ask

earnest phoenix
#

XD

#

Im new

drifting wedge
#

Ask it lmao

#

Firstly

#

You want to do python file name

#

Like add python before

#

To run it

#
  • u need to cd into folder
earnest phoenix
#

no

#

i did cmd from the folder

spare goblet
#

lol

earnest phoenix
#

iara?

drifting wedge
#

U did

#

Ok

#

Add python before

earnest phoenix
#

huh

drifting wedge
earnest phoenix
#

breh alr

drifting wedge
#

Also

#

U need to specify intents

#

Wait

earnest phoenix
#

alr

drifting wedge
#

U imported intents

#

That's not a thing

earnest phoenix
#

So i delete the line

drifting wedge
#

Try now?

earnest phoenix
#

Wait

molten cobalt
drifting wedge
#

Add to requirements.txt

earnest phoenix
#

wait wait

#

@earnest phoenix in the picture of ur cli HOW TF DID THE FILE EXECUTE

#

nvm im actually retarded

drifting wedge
#

@earnest phoenix how?

earnest phoenix
#

idek at this point

#

when i tried it

#

it said access denied

#

i tried chmod-ing it

#

but still the access denied prevailed so idek at this point

sick sluice
#

can someone help me transform

x = [ [ ['a', 1],['b', 2] ], [ ['c', 1], ['d', 2] ] ]

into

x = [ ['a', 1, 'c', 1], ['b', 2, 'd', 2] ]

in python

earnest phoenix
#

How do you access array in python again?

#

x[0] right?

#

im pretty sure

#

Ight lemme just think

#

yeah

#

You can just uh

#
a = [] # Make a new array
for e in x: # loop throught the array
  if isinstance(e, list): # check if the value is array
    i = [] # if yes then make another array
    for o in e: i.push(e) # loop thorught the value array, and push the value into that array
    a.push(i) # then push i array into the a array
  else:
    a.push(e) # push the value into the array
x = a # assign x to array a
#

Hope that make sense ig

sick sluice
#

let me try

earnest phoenix
#

Also please learn from the code :v

sick sluice
earnest phoenix
#

Ight i am dumb

sudden geyser
#

you may push a list of elements or just the element (List[T] vs. T)

earnest phoenix
#

I see

#

Nope i cant think, sorry.

#

When i use a command it doesnot work

#

but there are no errors on the cmd

#

More imformation please

#

wdym

#

Dms?

#

Alr

#

Wrapper Libary

#

Your command handler code

agile lance
#
module.exports = (client) => {
  console.log(
    `Ready to serve in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`
  );

client.user.setPresence({ game: { name: 'Under extreme maintenance.' }, status: 'dnd' })
  .then(console.log)
  .catch(console.error);
  
  }```

for whatever reason, this doesnt update the status and theres no error.
pale vessel
#

It's not called game anymore

agile lance
#

What do I make it?

pale vessel
#

activity

agile lance
#

Thanks <3

#

Works amazing

gilded olive
#

damn discord.js pepe

earnest phoenix
#

@earnest phoenix

#
#Error Handling
@client.event
async def on_command_error(ctx, error):
    if isinstance(error,commands.CommandNotFound):
        await ctx.send('Invalid command used.')```
#

Sorry 😦

#

Ahh

#

Python

#

Sorry,

#

I am not good with python

#

np πŸ™‚

#

@trim saddle

gilded olive
#

oh i can help

trim saddle
#

whats the error here?

cinder birch
gilded olive
#

side note

trim saddle
#

oh wait

gilded olive
#

that's eating all your other errors btw

cinder birch
#

How can they write like this?

earnest phoenix
#

DAMN

cinder birch
#

I mean Which language they' use

gilded olive
#
else:
  raise error``` @earnest phoenix add this to your code
lyric mountain
#

Python is so...confusing

gilded olive
#

so so

earnest phoenix
#

alr

trim saddle
#

it really isn't

cinder birch
gilded olive
#

actually

#

don't

#

you can use the traceback module

cinder birch
#

How can they' write like this

#

Please tell me language

trim saddle
#

why would you input like that

cinder birch
#

I just want to know they color thing

earnest phoenix
#

Python

lyric mountain
#

That's python

cinder birch
#

Oh thanks

trim saddle
#

```LANG```

lyric mountain
#

Discord just wordwrapped that block

earnest phoenix
#

Ghoul

#

dms

gilded olive
#

hmmm

#

alr

earnest phoenix
#

lemem try

sick sluice
gilded olive
#

I would stay away from CommandNotFound tho @earnest phoenix

gilded olive
#

can cause some

#

interesting spam

earnest phoenix
#

Do you have a better handler?

gilded olive
#

I would only use the global on_command_error for CommandOnCooldown

#

you can use them locally in commands

lyric mountain
#

Python be like:
"you'll either indent your code or you'll not code"

gilded olive
#

so it is specific

#
@command.error
async def command_error(ctx, error):
  # code```
cinder birch
#

How to write in that' color pandasad

earnest phoenix
#

Traceback (most recent call last):
  File "D:\python\lib\site-packages\discord\client.py", line 333, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\User\Desktop\Squash Updates\squashv2.py", line 43, in on_command_error
    raise error
  File "D:\python\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "D:\python\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "D:\python\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'version'```
#

;-;

gilded olive
#

what are you trying

cinder birch
#

Python is so confusing 😐

earnest phoenix
#

.stats

#

on cogs

gilded olive
#

.stats is a command?

earnest phoenix
#

Yes

gilded olive
#

and what is is supposed to return?

earnest phoenix
#

stats of the bot

gilded olive
#

and those are?

earnest phoenix
#

Code?

gilded olive
#

go ahead

earnest phoenix
#

Dms

gilded olive
lyric mountain
#

It's always dms

cinder birch
#
async def test(ctx, *args):
    retStr = str("""```css\nThis is some colored Text```""")
    embed = discord.Embed(title="Random test")
    embed.add_field(name="Name field can't be colored as it seems",value=retStr)
    await ctx.send(embed=embed)```
#

Rip

lyric mountain
#

Lul

gilded olive
#

πŸ—Ώ

cinder birch
#

Ghoul please tell me

gilded olive
#

how do I send that

cinder birch
#

I will vote your bot daily for one week

gilded olive
#

without it transforming

lyric mountain
#

```language
Like this
```

gilded olive
#

My bot is no where near ready

lyric mountain
#

Language would be your chosen highlight

pale vessel
#

(of course, replace language with the language itself)

cinder birch
#

😫

#

Please send a ss how to write please

lyric mountain
#

Oh my

#

I just wrote it

#

Do you even computer?

cinder birch
#

Yea but markdown works on it

gilded olive
#
print("Hello World")```
cinder birch
#

But I can see your ones in my phone too

gilded olive
#

forgot a parenthesis

#

wow

lyric mountain
#

I'm out, all yours

gilded olive
#

but you get the point

#

right?

#

right...

cinder birch
#
Print("hello world```
)
#

😫

pale vessel
#

That doesn't look like python

cinder birch
gilded olive
#

my image

#

was a bit shit

cinder birch
#

Please again

gilded olive
#
print("Hello World")```
#

3 backticks

#

the language

pale vessel
#

Good job

gilded olive
#

and you are good to go

cinder birch
#
Print ('"Hello World'")```
#

F

odd flume
#

any one know how to get a server count of the bot for top gg

gilded olive
#

what monstrosity is that @cinder birch

earnest phoenix
cinder birch
#

Python sucks

#

Js is good

gilded olive
#

i-

#

......

odd flume
#

Well

earnest phoenix
#

HAYAHAHAHAHAGAHSHDVSUBFBS

toxic mural
odd flume
cinder birch
gilded olive
#

i dont even know what to say

#

just

odd flume
gilded olive
#

...

#

:(

earnest phoenix
#

Well, this guy doesn't how the programation works.

earnest phoenix
#

"Python sucks"

#

Bruh

#

Python is the most used language

#

And big companys like youtube or google works with python

#

Every language has an speciality

cinder birch
earnest phoenix
#

JavaScript is for web debelopment and in some cases, app development

#

Python is a multi-platform language

tranquil drum
cinder birch
#

But it's giving problem for me I'm trying same as he told

opal plank
#

C langs, the rest is malfunctioning scrap mmulu

earnest phoenix
#

If we talk about oportunities python is better, but there is not a better language, each one has an speciality.

cinder birch
#

But it sucks

#

My opinion

earnest phoenix
#

You are the unique here that sucks

cinder birch
#

Lol

opal plank
#

I hate python for its indentation

cinder birch
#

I don't know why this person got triggered

#

Seems 14yo?

earnest phoenix
#

If you don't know how to use python, it's not a reason to say "python sucks"

cinder birch
#

14yo?

opal plank
#

@slender thistle come defend ur baby, they talkin sht bout py

gilded olive
earnest phoenix
#

learn more about python, work with python and then you can say if python is a good language or sucks (for you)

#

Thx.

opal plank
slender thistle
#

cracks fingers and clears throat
Who's trying to show off here this time?

cinder birch
#

imagine getting triggered for small thing

opal plank
#

Let me ise my preferences without throwing errors

#

Bad py

gilded olive
#

python is meant to be very friendly and readable, why would It not?

opal plank
slender thistle
#

Ok my keyboard warrior is still asleep and my eyes are burning

opal plank
#

Im dead

#

Been working all day

pale vessel
#

Hey dead

agile lance
#

What does (node:647) UnhandledPromiseRejectionWarning: Response: Internal Server Error mean?

pale vessel
#

Something went wrong on their end and it's not your fault

agile lance
#

Ok, Sorry if any of my questions are dumb

opal plank
#

Dont worry, 90% of questions here are way worse

#

Like people asking if they can code discord bots with roblox

gilded olive
#

is there even a lua wrapper?

opal plank
#

No, im not kidding

#

@gilded olive yes there is

#

Sinister takes care of thay

gilded olive
#

oh word

opal plank
#

Discordia iirc

gilded olive
#

ah yea ive heard of that

#

theres a popular bot written in c# that suprised me

#

nadeko

opal plank
earnest phoenix
#

Oh

#

Sorry xd

cinder birch
#
 print("Hello World")```
gilded olive
#

good job

cinder birch
plucky hollow
#

#p

languid solar
#

H!ping

#

lel

cinder birch
#
 @Hello 
#

WOAH

odd flume
#

hello?

near stratus
cinder birch
#

Nothing lol just testing

topaz fjord
#

yes syntax highlighting

teal plover
#

hello, so i've finally decided to split my script into cogs

#

doing so smthing happened

#

the bot started running twice

#

for some reason

#

like anytime i run the script. it goes online twice?

slender thistle
#

Show your code

teal plover
#

which part exactly?

#

the main file?

stiff walrus
quartz kindle
#

User is not cached or invalid or not found

stiff walrus
#

i want to cache the entire server

#

@quartz kindle

quartz kindle
#

First check if money[i].id.split('_')[2] is a valid user id

#

Then if the user is not cached, use users.fetch(id)

#

you'll need to await it

earnest phoenix
#

yo guys i don't know why, but recently i had this error when i want to play music with my bot
erreur de dispatcher : Error: input stream: Error parsing info: Unable to retrieve video metadata

quartz kindle
#

Thats a problem with the youtube library

#

See if there is an update, or check their github for issues

languid flame
#

Hello guys how to get RDP to make my bot online 24/7 ?

quartz kindle
#

rdp?

languid flame
#

yes

quartz kindle
#

Whats that

languid flame
#

this server online 24/7 and have fast internet speed

quartz kindle
#

A vps?

languid flame
#

yeah

quartz kindle
#

What exactly are you having problems with?

#

Did you buy the vps and dont know how to use it?

languid flame
#

no i want to get him but free

#

i have a way but take 7 week

#

and get vps/rdp for 1 month

quartz kindle
#

The only free vps that i know of is google compute engine

#

You still need a credit card to register

languid flame
#

did you know a way to make my bot 24/7 ?

#

free

quartz kindle
#

I pay for a vps

#

Most people do

languid flame
#

the problem i don't have credit card

quartz kindle
#

There are other free options but they are not vps, they are more limited

languid flame
#

i think glitch is not 24/7 ?

quartz kindle
#

More or less, it sleeps after a while

#

So you need to run a webserver on it

#

In any case, free options will always have limitations

#

There is no good full vps for free

tardy hornet
#

wtf

river crescent
#

how do i make my commands not case sens

#

so i can do -HeLp

#

ect

quartz kindle
river crescent
#

how do i do that?

earnest phoenix
#

anyone know hot to create folder on github?

#

#String.toLowerCase()

quartz kindle
#

^

languid flame
river crescent
#

i just started scripting yesterday

earnest phoenix
river crescent
#

#String.toLowerCase()
where do i put that

earnest phoenix
#

U know someone doesnt know how to code when they call it scripting

quartz kindle
river crescent
#

discord.js

#

and what is library xd

quartz kindle
#

So you need to convert the message content to lowercase

earnest phoenix
#

LMAO

quartz kindle
#

Where do you find the message content?

earnest phoenix
#

u know how to create folder on github?
@quartz kindle

river crescent
#

client.on('message', message => {
if (message.member.hasPermission(['KICK_MEMBERS', 'BAN_MEMBERS']))
if(message.content.startsWith(${prefix}kick)) {

let member = message.mentions.members.first();
member.kick().then((member) => {
    message.channel.send("πŸ‘‹" + member.displayName + "Has been kicked")
})
}

})

river crescent
#

where on there do i put it

tardy hornet
#

my whole code got deleted

#

wtf

earnest phoenix
#

@tardy hornet you deleted your code

river crescent
#

oof

earnest phoenix
#

What can we do

tardy hornet
earnest phoenix
#

Check ur recycle bin

river crescent
#

where do i put it on the script?

quartz kindle
river crescent
#

yes

quartz kindle
#

Thats what you need to convert to lowercase

tardy hornet
earnest phoenix
#

Ok then its gone

river crescent
#

do i make another if(message.content) or something?

quartz kindle
#

No

#

.toLowerCase()

languid flame
quartz kindle
#

On message.content

earnest phoenix
#

Inb4 if(message.content).toLowerCase()

quartz kindle
#

Lmao

river crescent
#

client.on('message', message => {
if (message.member.hasPermission(['KICK_MEMBERS', 'BAN_MEMBERS']))
if(message.content.toLowerCase()startsWith(${prefix}kick)) {

let member = message.mentions.members.first();
member.kick().then((member) => {
    message.channel.send("πŸ‘‹" + member.displayName + "Has been kicked")
})
}

})

#

like that?

quartz kindle
river crescent
#

cuz i got 5 errors now

quartz kindle
#

Almost

#

You need a . before startsWith

river crescent
#

ik i might have selected that when i when to remove it

#

ty

river crescent
#

use heroku. lasts 18 days. just use temp mail to make new accounts

#

or vds its better

quartz kindle
river crescent
#

like glitch

tardy hornet
river crescent
#

my friend used that a lot

quartz kindle
#

Glitch banned pinging services afaik

tardy hornet
#

almost r.i.p 1700 servers god damn it @earnest phoenix

river crescent
#

ye

quartz kindle
#

Replit didnt (yet)

river crescent
#

what can u use to ping replit

quartz kindle
#

A pinger service like uptimerobot

#

Or whatever

river crescent
#

k

languid flame
#

ok np

open mauve
#

How to make a filter of emoji no unicode ?

river crescent
#

how do i make a U DONT HAVE PERMSSION text

#

client.on('message', message => {
if (message.member.hasPermission(['KICK_MEMBERS', 'BAN_MEMBERS']))
if(message.content.toLowerCase().startsWith(${prefix}kick)) {

let member = message.mentions.members.first();
member.kick().then((member) => {
    message.channel.send("πŸ‘‹" + member.displayName + "Has been kicked")
})
}

})

open mauve
#
        return ['\:pierredesangpfc:', '\:pfcbande:', '\:epeedesangpfc:'].includes(reaction.emoji.name) && user.id === message.author.id;
        console.log("filtre reaction")
      };```
I have make this but is not fonctionnal
river crescent
#

@quartz kindle

#

wont work

tardy hornet
#
PS C:\among us emojis> node .
Launched shard 0
internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module './GuildMemberUpdate'
Require stack:
- C:\among us emojis\node_modules\discord.js\src\client\actions\ActionsManager.js
- C:\among us emojis\node_modules\discord.js\src\client\Client.js
- C:\among us emojis\node_modules\discord.js\src\index.js
- C:\among us emojis\bot.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at new ActionsManager (C:\among us emojis\node_modules\discord.js\src\client\actions\ActionsManager.js:23:19)
    at new Client (C:\among us emojis\node_modules\discord.js\src\client\Client.js:89:20)
    at Object.<anonymous> (C:\among us emojis\bot.js:54:15)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\among us emojis\\node_modules\\discord.js\\src\\client\\actions\\ActionsManager.js',
    'C:\\among us emojis\\node_modules\\discord.js\\src\\client\\Client.js',
    'C:\\among us emojis\\node_modules\\discord.js\\src\\index.js',
    'C:\\among us emojis\\bot.js'
  ]
}
#

i dont even use it

quartz kindle
earnest phoenix
tardy hornet
#

what dose it mean

quartz kindle
#

Reinstall it

earnest phoenix
#

Try reinstalling it or rebuild it

tardy hornet
#

oh okay

open mauve
#
        return ['\:pierredesangpfc:', '\:pfcbande:', '\:epeedesangpfc:'].includes(reaction.emoji.name) && user.id === message.author.id;
        console.log("filtre reaction")
      };```
I have make this but is not fonctionnal

Can help me ?
river crescent
#

Did you add it to the help command? The code you posted shows only the kick command
yes

tardy hornet
earnest phoenix
#

Np

cinder sandal
#

@green kestrel

#

ads

unique snow
#

If anyone wants money for free click the link above☝️ I have proof it's real and here I thought it was fake

pulsar bone
#

πŸ’­
how to select a random user from a role?

#

πŸ–• scammer

cinder sandal
#

ping a mod

#

he is advertisig

unique snow
#

Ur losπŸ˜‚πŸ€£πŸ˜‚πŸ€£

cinder sandal
#

@weak parrot

pulsar bone
#

self bot

pulsar bone
atomic vault
#

how to check that server is boosted in js

unique snow
#

#thisappsucksdick πŸ€£πŸ˜‚πŸ€£πŸ˜‚πŸ€£πŸ˜‚

cinder sandal
#

oh finally a mod actually responded

unique snow
#

Fuck all yall

weak parrot
#

Bruh

#

What's your issue

cinder patio
#

0 if it's not boosted, 1 if it's tier 1, 2 if it's tier 2, and 3 if it's tier 3

weak parrot
#

I deleted the ad as it's against our rules. Anyway any further advertisements from you and you will get banned @unique snow

weak parrot
#

Bruh don't add to it

sick sluice
#

hi, is there anyway to add multiple reaction to a message at once?
currently i'm looping it and the reaction added one by one

cinder patio
#

nope

long hare
earnest phoenix
#

because whatever value you're trying to use is null

near stratus
long hare
#

interesting...

fallow lichen
#

I'm trying to use a postgressql database with my bot but when i try to do an INSERT request, i only have this RuntimeWarning: coroutine 'Command.__call__' was never awaited adduser(playerid) RuntimeWarning: Enable tracemalloc to get the object allocation traceback
and then it crash. Do someone have a solution?

molten cobalt
#

can anyone tell me how to host on heroku??

earnest phoenix
#

don't

wet bloom
#

can you help me please?

rustic nova
#

just ask

#

what do you need

misty bough
#

Hey guys. I have a question about giving automatic roles. I want to give a specific role to my users who have 15 invites. How can I do that?

rustic nova
#

track user-created invites and see if the invite-count increases when a user joins

#

if so, just add it to some database

misty bough
rustic nova
#

Nope

#

you'll have to make that yourself

misty bough
#

Thanks, I'll learn how to make a Discord bot

green kestrel
#

I was pinged, still need help?

sick sluice
#

is there anyway to make my bot deafen in VC (discord-py)?

reef carbon
#
    main.entity-content__description {
        background: rgb(216, 199, 255) !important;
}
```Does anyone know why I can't change the background color of the long description?
narrow marten
molten cobalt
#

@narrow marten I want a host

#

but

#

i can't find it

narrow marten
#

free?

#

you want it free or what?

rustic nova
marble juniper
inland spoke
#

**Guys can someone help me in : how i make shared command like if the user in 2 server with my bot the bot tell him you shared with 2 servers **discord.js

reef carbon
#

is it .entity-content__description or without the period

molten cobalt
#

@narrow marten my bot is the best music bot discord gonna ever have i think but I don't have money to host GL_cry_2 GL_cry_2 GL_cry_2

pale vessel
#

It's a class

rustic nova
marble juniper
rustic nova
#

make it opt-out

reef carbon
#

it's still not working

rustic nova
marble juniper
#

lol

molten cobalt
#

@marble juniper hope so

reef carbon
#
    .entity-content__description {
        background: rgb(216, 199, 255) !important;
}
rustic nova
#

oh it's background-color

#

replace background with background-color

narrow marten
#

lol thats what I said 🀭

reef carbon
#

ok

pale vessel
#

Both work

#

Background and background-color works

rustic nova
#

background-color works for me

narrow marten
#

uh nvm

reef carbon
#

still didn't work

pale vessel
#

background is for combining multiple background images at once

#

It's still valid

rustic nova
reef carbon
#

wdym

rustic nova
#

make sure you're not missing any brackets

reef carbon
#
    .entity-content__description {
        background-color: rgb(216, 199, 255) !important;
}
rustic nova
pale vessel
#

Remove that !important, you don't need it

reef carbon
umbral zealot
rustic nova
#

oh wait that's the wrong thing

pale vessel
#

facepalm

reef carbon
#
<style>
    .entity-wrapper {
          background: rgb(216, 199, 255) !important;
}
 <!--#23272A-->
    .entity-content__description {
        background-color: rgb(216, 199, 255) !important;
}
    .entity-header__name {
        color: #1D1F21 !important;
}
    .entity-header__short-description {
        color: #1D1F21 !important;
}
    .entity-header__vertical-wrapper-section {
        color: #1D1F21 !important;
}
    .entity-header__stars {
        color: #1D1F21 !important;
}
</style>
```This is my whole tag
#

@rustic nova

pale vessel
#

This is not CSS

#

That's html

rustic nova
pale vessel
#

Comments for css is /* here */

reef carbon
#

oh ok

#

it worked

#

thanks!

pale vessel
#

Yeye

rustic nova
earnest phoenix
#

alright node gods, im testing a prod build and i'm wondering whether the bundle size of my frontend app really matters or not since it's going to be packed into an electron app

#

right now it's sitting at 2.49mb obfuscated

rustic nova
#

Transparent window PogU

earnest phoenix
#

windows terminal :p

reef carbon
pale vessel
#

Try adding border: none; to .entity-content__description

reef carbon
#

ok

carmine summit
#

How do I convert {["Hi!"]} to ["Hi!"]

earnest phoenix
#

what's the context behind this question

proper bolt
#

isnt {["Hi!"]} invalid json

#

no key

earnest phoenix
#

yeah

proper bolt
carmine summit
#

Hmm

#

Sec

#

How do I convert {content: ["Hi!"]} to ["Hi!"]

#

That doesnt seem right

#

Sec

earnest phoenix
#

because it isn't

carmine summit
#

There

#

Wait nvm i think i have the answer to my question

earnest phoenix
#

what's the context behind this question, again

#

ok

#

lol

carmine summit
#

Lol

earnest phoenix
#

Hey guys do somebody know how to write the code for a conveyor belt?

lusty quest
#

dumb or smart?

carmine summit
#

This is me coding while drunk

umbral zealot
#

A conveyor belt? Like, the real thing, in a game, in a website, in a gif???

earnest phoenix
#

@lusty quest

I want make an element wich checks if there is a element over it an giv it a new position in its way