#development

1 messages · Page 1066 of 1

jolly quail
#

Huh

jaunty junco
#

didnt crash tho

#

didnt add the role either

jolly quail
#

Not found?

jaunty junco
#

yep

jolly quail
#

Wth

jaunty junco
#

i think it doesnt find the role?

jolly quail
#

{"message": "405: Method Not Allowed", "code": 0}

#

Open that link

#

U will find this lol

#

Maybe permissions error?

earnest phoenix
#

you got that because you're trying to hit an api endpoint from your browser @jolly quail

#

there's no token in the auth headers

jolly quail
#

Oh lol

#

🤣

jaunty junco
#

xd

#

hmmm

#

lemme try again

jolly quail
#

What do u find there

#

@jaunty junco

jaunty junco
#

same thing

#

as you

jolly quail
#

Hmm

#

See the url

#

It found the member?

#

And the role too?

#

So i guess right http request was made?

jaunty junco
#

same error

#

yeah it was made

jolly quail
#

Ya so command worked fine?

#

Ig

jaunty junco
#

yeah

#

but

#

maybe its discord at fault?

restive furnace
#

or ur libs

jolly quail
#

Discord api

restive furnace
#

im not sure tho

jaunty junco
#

hmmm

jolly quail
#

Didn't discord api shift?

jaunty junco
#

hmm

#

they said they stopped the shifting

jolly quail
#

Hmm

jaunty junco
#

our CDN domain will not be migrated and will remain cdn.discordapp.com for the foreseeable future

jolly quail
#

At least this seems right..

restive furnace
#

yes cdn domain

solemn latch
#

v7 api?

restive furnace
jolly quail
#

Ikr

solemn latch
#

i thought max was v6 still

jaunty junco
#

so then

solemn latch
#

🤔

jaunty junco
#

hmmm

jolly quail
#

That's the error

#

Ig

#

Ur method is perfect now

jaunty junco
#

so then i should wait for an update on discordia?

restive furnace
#

i thought max was v6 still
@solemn latch nah, discord.js uses v7 too

jolly quail
#

Yep

restive furnace
#

but it doesnt exists in reality or smth

solemn latch
#

🤔

#

weird

restive furnace
#

yes

jolly quail
#

Lua discord lib should be updated

#

I guess

restive furnace
#

yea

jolly quail
#

To hit the correct api

solemn latch
#

and v7?

jolly quail
#

It's not shown at least

#

In official doc

restive furnace
#

if official libs has been told to use v7 or smth

digital ibex
#

d.js v12 uses v7, d.js v11 and below use v6

restive furnace
#

same goes to eris

#

and pretty much every official lib

digital ibex
#

eris uses v6

vestal star
#

It took so long for discord to add bot features that slack had for so long lmao

digital ibex
#

oh wait, i think eris uses v7

restive furnace
#

yes

#

since 13.0 or smth (im out of eris versioning sry)

digital ibex
#

because ~~ i cant log into user accoutns~~ someone i know cant log into user accoutns

jolly quail
#

Lol

#

🤣

digital ibex
#

is v6 gonna be deprecated?

tulip ledge
#

How do I make this command section thing go all the way to there

digital ibex
#

if its not, just use v6 instead of v7 lmao

#

margin-left: 100%

#

try that

tulip ledge
#

on the div?

jolly quail
#

Margin left ya

digital ibex
#

the child

tulip ledge
#

Lmao

digital ibex
#

try something like

#

1% and slowly get bigger until its where u want it

tulip ledge
jolly quail
#

float:right works?

tulip ledge
#

Wait no

#

I don't wanna move it to there

#

The div needs to go untill there

digital ibex
#

oh right

tulip ledge
#

I have to go eat now so @me then I can scroll back up

jolly quail
#

Oh

#

width:100%

#

@tulip ledge

#

?

willow river
jolly quail
#

It's not a function

restive furnace
#

you did upgrade from v11 to v12?

willow river
jolly quail
#

Hmm

sudden geyser
#

Are you using Discord.js v11 or v12

willow river
#

no @restive furnace

restive furnace
#

and its new DiscordEmbed

#

i mean

#

richembed

jolly quail
#

Lemme see

#

wait

#

It is a function hmm

willow river
#

How to upgrade work to V12

jolly quail
#

new Discord.RichEmbed()

#

@willow river try with new keyword once

#

Maybe

willow river
jolly quail
#

Ya

#

It's already that?

willow river
#

ya

jolly quail
#

Then ya version problem

#

Probably

willow river
#

ik

#

How to convert project to version v12

jolly quail
#

Hmm

#

@sudden geyser

willow river
#

Is there an explanation on YouTube?

sudden geyser
digital ibex
#

dont use var

#

use let or const

willow river
#

ook

#

ty ty 34

jolly quail
#

use let or const
@digital ibex why though

digital ibex
#

2 reasons, 1. its deprecated and let and const do exactly what var does

restive furnace
#

var gay

digital ibex
#

its basically useless

jolly quail
#

Hmm

#

Idk abt deprecated part

#

News to me

restive furnace
#

it is

sudden geyser
#

var is not deprecated.

restive furnace
#

basically

sudden geyser
restive furnace
#

yes

earnest phoenix
#

it's just due to scoping rules

#

lol

#

it's on you for being dumb and not understanding scoping

#

var is still usable

jolly quail
#

Ik all the scoping rules lol

#

Deprecated was the part that I asked abt

#

😅

digital ibex
#

i understand scopes catshrug

tulip ledge
digital ibex
#

i've never used it once

delicate shore
#

How to move a bot

jolly quail
#

Where did u give width:100%

delicate shore
#

From glitch

#

To Google cloud

#

If you could help I would be so grateful

low marsh
#

is anyone using the npm package ytdl-core-discord ?

delicate shore
#

You can't even imagine

low marsh
#

or the normal ytdl-core

tulip ledge
digital ibex
#

try 150%

tulip ledge
jolly quail
#

exactly which element to add that css to..

tulip ledge
#

I'll play with it

jolly quail
#

How can i tell without html code

#

Lol

delicate shore
#

Anyone help me too 😭

tulip ledge
#

125% did the trick

#

Thank you very much!$

jolly quail
#

Lol np

topaz fjord
#

you could just do fill-available for width

earnest phoenix
#

tip

stiff stream
#

how do i make that the bot type what i sayed. like say command?

earnest phoenix
#

use units relative to the thing you're resizing

stiff stream
#

how do i make that the bot type what i sayed. like say command?

jolly quail
#

how do i make that the bot type what i sayed. like say command?
@stiff stream that's basic..

stiff stream
#

tell me

jolly quail
#

Get the message content and send it to that channel

#

That's all?

earnest phoenix
#

remove your command from the message content and send the new manipulated string

jolly quail
#

Ya

stiff stream
#

Get the message content and send tht to that channel
@jolly quail how? im new

jolly quail
#

Js?

earnest phoenix
#

we're not here to teach you basic string manipulation

#

you have google

jolly quail
#

Lol

stiff stream
#

ok you dont need t ohelp

jolly quail
#

Hint: substring

delicate shore
#

Anyone help

jolly quail
#

Never used glitch sorry

#

😅

wicked juniper
#

where caan i host a bot?

stiff stream
#

wait

restive furnace
#

aws, google cloud, azure, galaxy gate, contabo @wicked juniper

jolly quail
#

Aws heroku azure

#

Lol

delicate shore
#

How to host a bot on Google cloud ? Pls tell I am currenyl hosting on glitch but it sucks

stiff stream
#
message.channel.send(`${argsresult},`)```
i need to change the args.join to something right?
delicate shore
#

Pls help hi

#

Guys

restive furnace
#

@delicate shore google has tutorials

delicate shore
#

Where

#

And what about env files

stiff stream
#
message.channel.send(`${argsresult},`)```
i need to change the args.join to something right?

?????????

delicate shore
#

Can I make a env file

#

On Google cloud

restive furnace
#

yes

forest mirage
#

Ron, if you’re making a say command:
<message>.content.substring(length of your prefix, command length, and + 1 for the space after the command)

delicate shore
#

Oo

jolly quail
#

message.channel.send(message.content.substring(prefix.length+command.name.length))

#

Something like that won't work?

forest mirage
#

just the prefix length? 🥴

jolly quail
#

Sorry xD

#

😅

forest mirage
#

and + 1

jolly quail
#

Ya for space

#

But discord removes

#

Leading space?

#

I thought

forest mirage
#

Not entirely sure tbh

jolly quail
#

Lol

forest mirage
#

Better to just have the +1 lol

jolly quail
#

Just try it

stiff stream
#

i know i need to change the args.join to something

jolly quail
#

Type with a space at start urself

#

:p

stiff stream
#

i need to add something

forest mirage
#

Do you have args defined?

stiff stream
#

yes

restive furnace
#

@stiff stream if you use discord.js, heres you in-depth tutorial: https://discordjs.guide, not saying other libraries have bad docs tho

jolly quail
#

It isn't working?

stiff stream
#

idk i know i need to add something

#

wait let me check

jolly quail
#

What do u wanna add

#

Bruh

#

Wth

#

Ur using assignment operator inside addField

#

I never tried that lol

stiff stream
#

its working

#

but

#

how do i make it so it wont say announcement there?

jolly quail
#

Ya

#

What?

stiff stream
#

ron announcement is the command

jolly quail
#

U added title to announcement..

stiff stream
#

no

#

i mean

#

see the announcement help

#

i only sayed help

jolly quail
#

Ok

stiff stream
#

i dont want it to say announcement in the field

jolly quail
#

I see

#

.slice()

#

Will that work?

stiff stream
#

idk

#

let me try

jolly quail
#

args.join(" ").slice()

#

Lemme see slice

earnest phoenix
#

use eslint

#

Derku

#

eslint?

#

or beautify your code

#

oh i see what you mean

forest mirage
#

I honestly hate eslint lol

jolly quail
#

@stiff stream done?

digital ibex
#

u can configure it to what u want, noah

earnest phoenix
#

i like it since it makes code look better and removes unnecessary stuff

#

u can configure it to what u want, noah
yh using rules

forest mirage
#

I’m aware of what it can do

earnest phoenix
#

this looks trash how to make it look and run better as it is weird like i want to set custom number for buy
@earnest phoenix okay wdym btw, elaborate

digital ibex
#

i dont use it because i cant even be bothered

stiff stream
earnest phoenix
#

not how u use .slice

#

@earnest phoenix okay wdym btw, elaborate
@earnest phoenix like ik it can be better and its weird code like confusing it doesnt look liek a pro did it i want a shop liek dank memer ya know like can set custom price ect.

jolly quail
#

No no

stiff stream
#

oh

#

i see

#

wait

jolly quail
#

args.join(" ").slice()
@jolly quail

stiff stream
#

yes i see

earnest phoenix
#

@earnest phoenix like ik it can be better and its weird code like confusing it doesnt look liek a pro did it i want a shop liek dank memer ya know like can set custom price ect.
@earnest phoenix oh like guild settings for prices?

#

don't need linting when it's all going to be minified in prod sunglassesvery3dcool

#

@earnest phoenix oh like guild settings for prices?
@earnest phoenix im not sure tbh like uhh kinda hard to explain

#

i mostly use eslint just for indentation

jolly quail
#

Custom price requires a database for guild

stiff stream
restive furnace
#

i mostly indent myself

stiff stream
#

still says announcement in there

jolly quail
#

Oof

#

My bad

earnest phoenix
#

@stiff stream what do you want it to say?

stiff stream
#

?

jolly quail
#

args.slice().join(" ")

#

XD

#

😅

forest mirage
#
message.channel.send(new Discord.MessageEmbed().setTitle("**__Announcement__**").setColor("FF0101").addField("Announcment:", message.content.substring(prefix.length + 13))```
earnest phoenix
#

avoid spoonfeeding

jolly quail
#

Lol

earnest phoenix
#

@earnest phoenix how use eslint

#

check online

#

hard to explain

stiff stream
#

@jolly quail nope

forest mirage
#

Just better to do substring if you’re not using individual arguments

jolly quail
#

Hmm

earnest phoenix
#

im actually wondering the performance in substring vs array join

jolly quail
#

Substring better

#

Ig

earnest phoenix
#

substring internally has to use arrays anyways

stiff stream
jolly quail
#

And the code?

stiff stream
#

still saying the announcement in it

restive furnace
#

strings internally are arrays

earnest phoenix
#

yes

#

you're slicing nothing

jolly quail
#

How's that possible

earnest phoenix
#

cpp strings are fun

#

it doesn't know what args to slice

delicate shore
#

Bruh

jolly quail
#

slice() removes the first

#

I thought

restive furnace
#

cpp strings are fun
yes

stiff stream
#

so slice[1]?

earnest phoenix
#

what's args defined as @stiff stream

delicate shore
#

How you defined args ?

earnest phoenix
#

it did remove first

forest mirage
#

Ron I gave you code KEKW

earnest phoenix
#

it removed ron

#

lol

jolly quail
#

Ron I gave you code KEKW
@forest mirage xD

delicate shore
#

How you defined args

earnest phoenix
#

Ron I gave you code KEKW
Noah gave perfect code but idk what happened

stiff stream
#

@forest mirage ty

restive furnace
jolly quail
#

probably args[0] is nothing

forest mirage
#

He didn’t use it

earnest phoenix
#

god knows what the fuck they're doing this is a result of hotgluing code from different sources together lol

jolly quail
#

Poor noah xD

forest mirage
#

How many stack overflow tabs do you think they have open?

delicate shore
#

How to shift from glitch to Google cloud

jolly quail
#

Nice question

#

0 maybe

#

Cuz he's dependent on us

earnest phoenix
#

yo how do i make iframe the keep making the the loop infinitly

#

like this

jolly quail
#

Wth

restive furnace
#

i wonder why you want to do like that?

earnest phoenix
#

cuz why not

digital ibex
#

its just gonna get declinef for something like useless info

jolly quail
#

Add dynamic divs with the iframe at specified positions

#

Ig

stiff stream
#

@forest mirage ty, its works great. just change the (prefix.length + 13)) to (PREFIX.length + 13))

earnest phoenix
#

its just gonna get declinef for something like useless info
@digital ibex uhh

forest mirage
#

you defined prefix as PREFIX? lol

jolly quail
#

He doesn't know all of ur code :p @stiff stream

restive furnace
#

you need to provide useful information, hayper.

earnest phoenix
#

is this useful enought?

digital ibex
#

something like this: "long description on your bot's page is filled out with spam/junk to reach the 300 character minimum requirement. Please rewrite your description to include more useful information about your bot."

#

yeah, it is

earnest phoenix
#

Ight

digital ibex
#

i think so anyways

earnest phoenix
#

i ctrl v ctrl p from my github page lol

digital ibex
#

nice

earnest phoenix
#

my creativity died

#

That's why there's
How to host? section

#

Ah nvm i will delete it

pure lion
#

Wouldn't it be funny if you could somehow make a bot in scratch

dreamy heron
#

I was reading over the requirements to add a bot to the server list, and I noticed they said the bot would be tested with "permissions=0".

Now i get that they mean to say the bot will be tested with no permissions, but what I'm not quiet sure of, is what they expect the bot to do when it has no permissions? Do they expect the bot to DM the owner of the server?

If anyone could help clear this up for me, I would be very grateful. :)

north hollow
#

i need help how to show the server logo with a command

tulip ledge
#

"if your bot is more then in 75 guilds" did they lower it? It used to be 100 right?

slender thistle
#

No it was always 75

#

... afaik

jolly quail
#

i need help how to show the server logo with a command
@north hollow well just search message.guild for it's pic i guess?

dreamy heron
#

It has not changed
Their message can be a bit confusing, but what they mean is: If your bot is in 75 guilds, you can begin your verification process, but it isn't required until you hit 100.

north hollow
#

@north hollow well just search message.guild for it's pic i guess?
@jolly quail ok

brave sapphire
#

How do you list all servers your bot is in With discord.js

forest mirage
#

<client>.guilds.cache.map(guild => guild.name).join(however you want to join it)

restive furnace
#

Wouldn't it be funny if you could somehow make a bot in scratch
@pure lion i can

#

but its not fun :c

#

i like to make GUI applications :c bcs they fun

tired nimbus
#

📜🔤client/client.🍇🔤

🏁🍇

🔤confidential🔤 ➡️ token

🆕🔌🆕token❗️ ➡️ client

💞client 🔤message🔤 🍇msg_⚪️
    🍺🔲msg_ 🖊 ➡️ msg
    ↪️🎼💬msg❓ 🔤.echo🔤❗️ 🍇
        🔈client 🏠msg❓ 🔪💬msg❓ 5 📐💬msg❓❗❗️❗️
    🍉
🍉❗️

🏃client❗️

🍉

Hi is there a faster way to use emojis

slender thistle
#

....???

earnest phoenix
#

are you like, trolling?

#

I mean I've seen that done before but really?

tired nimbus
#

no im following emojicode discord lib

#

I want to try it out

earnest phoenix
#

oh

digital ibex
#

whats this library called?

tired nimbus
#

Its World Emoji Day so I wanted to celebrate and try it out

digital ibex
#

but whats the library called so i can probably help out 🙂

tired nimbus
trim lark
#

LOL

digital ibex
#

wow

sinful belfry
#

@tired nimbus have u tried Windows key + .?

tired nimbus
#

oh wow I never knew that existed

dreamy heron
#

omg thats a thing

#

wtf

#

Thank you

sinful belfry
#

lol np

trim lark
#

whoa

dreamy heron
#

ikr

trim lark
#

(☞゚ヮ゚)☞

sudden geyser
#

Hi is there a faster way to use emojis
He's speaking the language of Gods.

dreamy heron
#

Hahaha my exact thoughts when that window popped up

digital ibex
#

holy

trim lark
#

cow

dreamy heron
#

Starman, if you're still reading chat, could you help me with my previous question? :3

north hollow
#

i need help how to show the server logo with a command

dreamy heron
#

Like in making a bot to do that or?

lyric mountain
#

i need help how to show the server logo with a command
@north hollow guild.avatar ig

digital ibex
#

icon lol

trim lark
#

@north hollow waht language

north hollow
#

js v12.2.0

digital ibex
#

please....

#

its not js v12

#

its discord.js v12

sinful belfry
#

I was reading over the requirements to add a bot to the server list, and I noticed they said the bot would be tested with "permissions=0".

Now i get that they mean to say the bot will be tested with no permissions, but what I'm not quiet sure of, is what they expect the bot to do when it has no permissions? Do they expect the bot to DM the owner of the server?

If anyone could help clear this up for me, I would be very grateful. :)
@dreamy heron we give bots basic/required permissions such as sending embeds, etc.

pure lion
#

:l

dreamy heron
#

Oh okay good. Thank you.
I was just thinking like, if it cant read a channel, how would i know what it wants? xD
So helpful <3

sinful belfry
#

lmao

pure lion
#

I thought it was guild.icon

forest mirage
#

guild.iconURL()

white stone
#

So I'm here again, learning more about scripting as i'm trying to figure out how to make a mute command, this is the script I have now, but whenever I try to run the command which goes as next $mute (@'d player) 10s or 10h etc

#

but the bot just yeets itself of the mountain and I get this

#

and then it just shuts of

#

so any java scripters any idea on how to help me?

chilly bison
#

@white stone discordjs v11 or 12?

white stone
#

12.2.0

forest mirage
#

managers RareParrot

chilly bison
#
case 'mute':
  let person = message.guild.members.cache.get(message.mentions.users.first().id || args[0]);

#

change that

#

2nd

#

uhh

forest mirage
#

and before .find()

#

and it’s roles.add

#

and roles.remove

white stone
#

I see

#

ty

#

lemme see if that works

chilly bison
#
let mainrole = message.guild.roles.cache.find(role => role.name == "Roleplayers");
let muterole = message.guild.roles.cache.find(role => role.name == "Mute");
#

use that

white stone
#

ty

chilly bison
#

also

#
if(!args[1] || isNaN(Number(args[1]))){
//return an error
}
#

use [1] because its zero-indexed

white stone
#

k I will

chilly bison
#
person.roles.add(muterole, "reason").catch(console.error);
person.roles.remove(mainrole, "reason").catch(console.error);
pale vessel
#

tage

#

also, that code is v12

#

they're using v11

white stone
#

I'm using V12

pale vessel
#

wtf

white stone
pale vessel
#

explain yourself

chilly bison
#
message.channel.send(person.user.toString() + " has been muted for " + time);
white stone
#

explain myself I'm learning to code

pale vessel
#

or just use `${person} has been muted for ${time}`

chilly bison
#

?

#

in other words

#

its suprising your code worked at all

#

there are so many errors...

white stone
#

I mean it didn't work

#

it failed

chilly bison
#

its not even close to working

#

please read the docs next time

pale vessel
#

please read docs

chilly bison
#
#

read that

#

just sit down

#

for an hour

#

and read it

#

it will make your life much easier

pale vessel
#

and others too tbh

chilly bison
#

it does not explain things well

#

please read the docs

modest maple
#

Do it daddy

trim saddle
#

fish wtf

modest maple
#

Bruh

#

Give it to me

trim saddle
#

say it in a not horny way

modest maple
#

Can I have it quick?

#

I hope it's not too hard 😋

solemn latch
#

thats not what she said

trim saddle
#
idre = re.compile(r"([a-zA-Z0-9]{22})$")

        try:
            match = re.search(idre, key_album)[0]
        except:
            match = None
        if match:
            res = ('exact', await bot.sp_client.get_track(match))
        else:
            res = ('search', await bot.sp_client.search(key_album, type_="album", limit=1))
        
        if res[0] == 'exact' and not res[1] or res[0] == 'search' and len(res[1]['albums']['items']) < 1:
            em.set_author(name="Sorry.", icon_url=bot.img)
            em.description = "No album was found from your search."
            return await ctx.send(embed=em)
        key_album = res[1]['albums']['items'][0] if res[0] == 'search' else res[1]
#

wtf github

modest maple
#

Isn't it find_all or something for re

trim saddle
#

uhh yeah

#

but this is what i did for the playlist commands

modest maple
#

What's an example id bte

trim saddle
#

the typical spotify id looks like 1R6vbGGXSEZZmTGn7ewwRL

modest maple
#

@trim saddle remove the $

trim saddle
#

...

modest maple
trim saddle
#

i swear to god

#

that's the second time this happened

#

last time it was an h

amber fractal
#

$ means end of text I believe

summer torrent
#

what does {22} mean? length?

amber fractal
#

length 22 yes

#

no more no less

trim saddle
#

how many times to match

amber fractal
#

specifically that ^

#

matches the preceding token that many times

#

you can also define ranges

#

{x,y} I believe

tulip ledge
#

I have 1 chrome tab open how is this eating through my fucking ram

sick cloud
#

because its chrome

trim saddle
#

@modest maple so i figured out how to test without restarting or using the beta

#

reloading on one cluster and fucking about 5k guilds mmLol

tulip ledge
#

lmao

#

"Dog fucks 5000 groups of people at once"

hearty wind
#

whejre is the python help channel lol

modest maple
#

there isnt one

slender thistle
#

Here

modest maple
#

🙃

earnest phoenix
#

hey guys

#

yes guys

#

bye guys

hearty wind
#

i can post code here for assistance?

slender thistle
#

If you describe your issue, yes

hearty wind
#

Ok.

copper cradle
#

Im using an azerty keyboard now

#

this is awful

slender thistle
copper cradle
#

oh shit

sudden geyser
#

why though

earnest phoenix
#

hey guys

#

yes guys

#

bye guys

#

:/

slender thistle
#

Why

earnest phoenix
#

because hey guys yes guys bye guys

slender thistle
#

Stop

tulip ledge
#
.command-name-column::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -17px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('/assets/img/right-arrow.svg');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    transition: all .4s ease;
}

Any idea why this isn't adding a right arrow to the front of the command-name-column

earnest phoenix
#

because my bot is still not approved

slender thistle
earnest phoenix
#

@slender thistle can i know when my bot is going to be approved?

slender thistle
#

3+ weeks since submission date

earnest phoenix
#

its been 1 week i guess

#

or 2 weeks

#

or 3

#

or maybe 4

slender thistle
#

Or maybe can you move to #general before you get muted for misusing channels

crystal bison
#

what about image @slender thistle ?? or does that change automatic

earnest phoenix
#

wait is my bot in this server?

slender thistle
#

avatar (bytes) – A bytes-like object representing the image to upload. Could be None to denote no avatar.

earnest phoenix
#

how did it manage to ping it then

slender thistle
#

@earnest phoenix Did you ignore my last message

earnest phoenix
#

ummm

#

development is for bots?

slender thistle
#

For help with coding

earnest phoenix
slender thistle
#

Read the channel topic there

earnest phoenix
#

okden

crystal bison
#

avatar_url_as(*, format=None, static_format='webp', size=1024) so... im guessing add source in there

slender thistle
#

what

#

I pointed you to ClientUser.edit, not User.avatar_url_as

earnest phoenix
#

Can anyone help me add a header to my website/nav bar

hearty wind
#
        for second in range(60):
            message_id = await message.channel.fetch_message(message.id)
            for reaction in message_id.reactions:
                thumbs_up_count = 0
                thumbs_down_count = 0
                if str(reaction.emoji) == '👍':
                    thumbs_up_count = reaction.emoji.count
                if str(reaction.emoji) == '👎':
                    thumbs_down_count = reaction.emoji.count
                await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?**   :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))
                await asyncio.sleep(3)

Here is my code, it makes a poll right, and when people react with the thumbs up or down it tries to count how many did thumbs up, and how many did thumbs down. then displays the number by constantly editing the message. the code sucks, but I'm not seeing the logical error but it is there.

quaint hornet
#

yours are having voice problens with discordjs?

earnest phoenix
#

Can anyone help me add a header to my website/nav bar

#

cant you just use the developer portal to change the avatar ? @crystal bison

hearty wind
#

i imagine this is the wrong server for discord bots. my bad.

earnest phoenix
#

you can still use this @hearty wind

#

since this chcaannel is for bot development

slender thistle
#

@hearty wind You are resetting the count on each iteration

hearty wind
#

yes it goes back to 0 but does it not change to the number in thumbs_up_count = reaction.emoji.count to display the count?

#

like it does go to 0 but it changes imemdiately after in the if statement? or no?

slender thistle
#

hmm

earnest phoenix
#

Can anyone help me add a header to my website/nav bar
@earnest phoenix uhm dont you think that is the basic as hell stuff in html?

hearty wind
#

also yes the code is very bad and spammy lol.

drowsy sky
#

put the
thumbs_up_count = 0
thumbs_down_count = 0
outside of the loop

hearty wind
#

ok let me try.

drowsy sky
#

it is counting but every time the loop starts it resets to 0

crystal bison
#

ughhhh i didnt change it in bot option i just changed it in general info

drowsy sky
#

that explains a lot

#

like

#

A LOT

crystal bison
#

lmao

earnest phoenix
#

I don't understand how to make a Bot right now I am making one and the thing keeps saying the boys client ID is invalid when it's not

#

Can I have some help making it

misty sigil
#

what error are you getting?

crystal bison
#

yey lol i blocked adverts and NSWF content awesome

pale vessel
#

Not Safe Work For

crystal bison
#

lol

#

you know what i ment

north hollow
#

i need help how to make a ping command that show your ms

summer torrent
#

wdym by your

errant jay
#

sorry but, someone help me with the voting command? I don't know how it does

pure lion
#

:l

earnest phoenix
#

Text: sometext first:"something" second:"something else"
/(?<=:)[A-z]+|(?<=")[A-z ]+(?=")/
I want to grab both something and something else how can I do that?

pure lion
#

sometext.first/sometext.second

#

Wait nvm

#

Me retar

earnest phoenix
#

?

opal plank
#

start on :" and finish at :, use global so it doesnt return on first match

#

use \w greedy for something if its not only characters

#

@earnest phoenix hmmm you could use this btw

#

/(")(.)*?\1/gm

autumn aspen
#

    msg = message.content.toLoverCase();

    if (message.author.bot) return; 

    mention = message.mentions.users.first();

    if (msg.startsWith (prefix + "send")) {
        if (mention == null) { return; }
        message.delete();
        mentionMessage = message.content.slice (8);
        mention.sendMessage (mentionMessage);
        message.channel.send ("done!");
    }

Why error?

opal plank
#

LoverCase?

autumn aspen
#

Yeah?

misty sigil
#

lower

opal plank
#

not LowerCase?

misty sigil
#

not lover

opal plank
#

lmao

autumn aspen
#

lmao

opal plank
#

loveRollRGB lovecase

autumn aspen
#

Its still not working :/

earnest phoenix
#

everyone be warned this dude is a drama machine

#

he's been reported to discord, made false threats toward me.

autumn aspen
#

@earnest phoenix Hello!

opal plank
#

gargle

#

prob not the right place to post that

earnest phoenix
#

It is for your own safety

autumn aspen
#

We no care

earnest phoenix
autumn aspen
#

Ok??

earnest phoenix
#

he ip catches people

opal plank
#

just dm a mod

earnest phoenix
#

I did

#

I got it all on recording

opal plank
#

no need to post shit here, just dm a mod and let them know

earnest phoenix
#

submitting to a mod rn

slender thistle
#

@earnest phoenix There's no need to bring it here if you already contacted a moderator

earnest phoenix
#

cool

#

I have every right

#

to warn you guys

opal plank
earnest phoenix
#

Yes

#

I care about your safety

slender thistle
#

I have every right to mute you for causing shit, especially in a wrong channel.

autumn aspen
#

Yes but "fuck you" is happening like 24/7 lmao

earnest phoenix
#

Shivaco then it'd make you a rlly crappy human being

autumn aspen
#

I have every right to mute you for causing shit, especially in a wrong channel.
@slender thistle lol mute him

opal plank
#

bruh move this argument elsewhere

earnest phoenix
#

@opal plank Is it possible to see where it got that from

#

I am letting everyone know about him that he is dangerous

slender thistle
earnest phoenix
#

now that you know it's done

opal plank
#

@earnest phoenix wdym?

autumn aspen
#

Bro keep this channel on topic

earnest phoenix
#

and Tonkku knows about this so I wouldn't mute

#

Like

slender thistle
earnest phoenix
#

no

#

I'm going to move

#

off discord now

slender thistle
#

Cool

earnest phoenix
#

cause i gtg

opal plank
earnest phoenix
slender thistle
#

One more off-topic message in this channel and you are muted

#

thank you for understanding

earnest phoenix
#

@opal plank So you know how it is first:"something" how can I get the first, and the something

#

wait

#

is this kid trashtalking about me?

slender thistle
#

Stop right there

opal plank
#

hmmm not sure i get what you mean alhassan

#

omg

#

guys, fuck off this channel

#

fr

earnest phoenix
#

can any mod get to dm mme?

slender thistle
#

Either move to DMs or stop this drama

earnest phoenix
#

LOL

slender thistle
#

You two solve it yourself

#

Last warning

earnest phoenix
#

i literally just came here

autumn aspen
#

lol

earnest phoenix
#

i dmed a mod just an fyi and it's been taken care of

autumn aspen
#

Warn them lmao

#

their burnt their last chanse

#

@slender thistle

earnest phoenix
#

I actually originally needed help

#

can you send them the recording of the "whole" chaat?

slender thistle
#

you two stop

autumn aspen
#

I actually originally needed help
@earnest phoenix Whatuafaq??????

earnest phoenix
#

I did

opal plank
#

@autumn aspen show the error btw

earnest phoenix
#

But this guy went into a rant on my in dms

#

xd

#

anyways

#

bye

autumn aspen
#

@slender thistle Mute them lol

earnest phoenix
#

it's been delt with

autumn aspen
#

haha

slender thistle
#

@autumn aspen I don't need to be told how to moderate

autumn aspen
#

xD sorry then

dark eagle
#

How do u get people on ur server

earnest phoenix
#

um

#

ask them nicely?

slender thistle
#

Wrong channel to ask

autumn aspen
#

    msg = message.content.toLoverCase();

    if (message.author.bot) return; 

    mention = message.mentions.users.first();

    if (msg.startsWith (prefix + "send")) {
        if (mention == null) { return; }
        message.delete();
        mentionMessage = message.content.slice (8);
        mention.sendMessage (mentionMessage);
        message.channel.send ("done!");
    }

@opal plank

slender thistle
#

LoverCase still

autumn aspen
#

I changed it to Lower'

opal plank
#

show the error btw

earnest phoenix
#

Ok so erwin

opal plank
#

not the code

#

wssup

earnest phoenix
#

@autumn aspen

#

What

#

Command

#

Here is the current text
sometext first:"something" second:"something else"

we grab "something" and "something else"

#

I need to know what came before it

#

in this case it's first and second

opal plank
#

yeah, though it will fail if there are more than 2

earnest phoenix
#

That's the issue I was facing

opal plank
#

the way i did it is to not return, its greedy

autumn aspen
#
    at wrapSafe (internal/modules/cjs/loader.js:1054:16)
    at Module._compile (internal/modules/cjs/loader.js:1102:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)

    at internal/main/run_main_module.js:17:47```

@opal plank 
Do I need a command handler?
earnest phoenix
#

Give me music command

#

Anyone

slender thistle
#

No one will give you a command code

autumn aspen
#

Give me music command
@earnest phoenix No spoonfeed

earnest phoenix
#

Why

slender thistle
#

Spoonfeeding is not allowed in this server

earnest phoenix
#

🙁

opal plank
#

@autumn aspen })

#

add that in the end

autumn aspen
#

Why
@earnest phoenix Read rules

earnest phoenix
#

So

autumn aspen
#

@autumn aspen })
@opal plank oh ok

earnest phoenix
#

How I can get coomand

errant perch
#

how do i make commands that are inside of switch statement case insensitive

opal plank
#

are you not looking at your linter?

#

@errant perch turnt he args lowercase beforehand

earnest phoenix
#

@earnest phoenix Called making it, Like everyone else here has too.

autumn aspen
#

How I can get coomand
@earnest phoenix dude search on YT or smth read the rules

earnest phoenix
#

?

errant perch
#

oh yea

#

thx

slender thistle
#

switch (LoweredMessageContent)

earnest phoenix
#

So do you think I can do anything Erwin?

#

🤔

opal plank
#

depends, you only want 2 iterations?:

autumn aspen
#

switch (LoweredMessageContent)
@slender thistle thx

earnest phoenix
#

I mean.. I can work with two

slender thistle
#

Not you

earnest phoenix
#

Sure

opal plank
#

but ONLY two?

earnest phoenix
#

can it be one or smth

opal plank
#

you gotta be the one to tell me lol

#

idk what you're doing

#

¯_(ツ)_/¯

earnest phoenix
#

it's sort of like variables

#

something like this

opal plank
#

give me 2 examples if possible

earnest phoenix
#

-embed title:"some title" description:"desc" color:"RED"

opal plank
#

so there are 3 there

earnest phoenix
#

ik

opal plank
#

in which case you wont want limited

#

you'll prob want to iterate the whole string

earnest phoenix
#

best case scenario

opal plank
#

with /g on

earnest phoenix
#

I kind of have no idea how to work with regex so

autumn aspen
#

@opal plank dude still wrong?

opal plank
#

so it can be
this:"that"
d:"this", k:"foo", bar:"ok"

#

between 1 and N matches i assume

#

@autumn aspen show

earnest phoenix
#

yea

opal plank
#

that regex i gave you should work for unlimited times

autumn aspen
#

so it can be
this:"that"
d:"this", k:"foo", bar:"ok"
@opal plank huh?

earnest phoenix
#

$onlyIf[$getUserVar[Experience]>$getUserVar[Level XP];Você não tem experiência para elevar.]
$setUserVar[Experience;$sub[$getUserVar[Experience];$getUserVar[Level XP]]]
$setUserVar[Level XP;$sum[$getUserVar[Level XP];500]]
$setUserVar[Level;$sum[$getUserVar[Level];1]]
$deletecommand
$nomention
$color[$getUserVar[Theme]]
$title[Level Up!]
$description[Parabéns agora você upou para o Level $sum[$getUserVar[Level];1], seu próximo level precisa

opal plank
#

it'll get anything between quotation marks

earnest phoenix
#

I don't get the title, description, and color

#

This comand

autumn aspen
#

$onlyIf[$getUserVar[Experience]>$getUserVar[Level XP];Você não tem experiência para elevar.]
$setUserVar[Experience;$sub[$getUserVar[Experience];$getUserVar[Level XP]]]
$setUserVar[Level XP;$sum[$getUserVar[Level XP];500]]
$setUserVar[Level;$sum[$getUserVar[Level];1]]
$deletecommand
$nomention
$color[$getUserVar[Theme]]
$title[Level Up!]
$description[Parabéns agora você upou para o Level $sum[$getUserVar[Level];1], seu próximo level precisa
@earnest phoenix dude

opal plank
#

@autumn aspen not you, alha

earnest phoenix
#

Is not working

#

oh

autumn aspen
#

oh ok

earnest phoenix
#

😓

opal plank
#

@earnest phoenix what EXACTLY are you trying to accomplish?

#

i see what you need, but that doesnt seem the right way to do it

#

specially cuz your example is with embed, which can be read instead of regex'd

earnest phoenix
#

wdym read?

#

How so?

#

K

opal plank
#

why treat and embed like a string when its an object

earnest phoenix
#

I mean any way that I can establish same result

hearty wind
#

can anyone point me to way to count emoji reactions.

opal plank
#

also, im assuming you on d.js right?

earnest phoenix
#

yep

opal plank
hearty wind
#
 if str(reaction.emoji) == '👍':
                    thumbs_up_count += reaction.emoji.count
                if str(reaction.emoji) == '👎':
                    thumbs_down_count += reaction.emoji.count

this is not working.

#

oh its in python.

opal plank
#

@earnest phoenix lemme get a test rq

#

one sec

earnest phoenix
#

kk

hearty wind
#

not sure why that doesn't work.

errant perch
#

\👍

earnest phoenix
#

discord.js

slender thistle
#

Don't start library wars now

hearty wind
#

hahahha

earnest phoenix
#

xd

errant perch
#
case "ping"
     messsage.channel.send("pong")
break;
}```
#

case insensitive switch statement

#

uh

#

if anyone wants it

#

its works

opal plank
#

alright, i just checked, this is what i mean @earnest phoenix

#

you can fetch the message and read its values directly

earnest phoenix
#

What?

#

@slender thistle what library is better inyouropinion

#

That doesnt make an embed tho

opal plank
#

this is what i meant of instead of reading the embed as a string, read it as an object

earnest phoenix
#

im not doing that

opal plank
#

then what exactly are you doing?

earnest phoenix
#

wait

opal plank
#

both your examples were embeds

#

figured you were working with those

earnest phoenix
#

its just only think I thought of

slender thistle
#

A custom one made by the developer in order to optimize resource usage

vestal star
earnest phoenix
#

hey thats advertisement

vestal star
#

lmao, look at the page

opal plank
#

@earnest phoenix do you have more sample data?

#

like, actual sample data

earnest phoenix
#
let title, description, color;
string = '?embed title:"title" description:"desc" color:"color"'
// do some magic to get each thing and its value
message.channel.send(new MessageEmbed().setTitle(title).setDescription(description).setColor(color));
#

@vestal star it looks so bad

#

does this make stuff clearer

opal plank
#

thats the bit that confuses me, why you using strings?

earnest phoenix
#

it even has a fake chat person

vestal star
#

ik

#

thats the point

earnest phoenix
#

Consider it a message

#

It's supposed to be a message

#

from someone

#

in a channel

opal plank
#

so you making a message to embed

#

command

earnest phoenix
#

a command to make an embed, yes.

opal plank
#

aight, we go from there then

earnest phoenix
#

thats quite easy

#

if you want to be spoonfed i can send you the code

#

but idk if thats allowed here

opal plank
#

since they are separated by spaces, why not use split() and use args?

#

and then check with switchCase

earnest phoenix
#

@slender thistle how do i get the bot developer ro.e?

#

isnt necessarily going to have spaces

slender thistle
#

if you want to be spoonfed i can send you the code
@earnest phoenix Not allowed

Bot Developer role is given to you once your bot is approved

opal plank
#

hmmm

#

without spaces that turns into a bit more annoying

earnest phoenix
#

that's why I thought of regex :/

#

and can i know aproximately when that is going to be done :/ and are their chances of my bot getting declined and what are the requirements

opal plank
#

?embed title:"title" description:"desc" color:"color"
?embedtitle:"title"description:"desc"color:"color"

slender thistle
#

And, once again, keep this channel on topic

earnest phoenix
#

1st space will always be there

opal plank
#

for sanity i would recommend keeping the spaces, but lets see

earnest phoenix
#

others not necessarily

opal plank
#

your best option is to require spaces or some sort of split

#

i'll tell you why

earnest phoenix
#

dont like that idea ngl

opal plank
#

the regex is going to be super annoying to keep checking whats before AND after the :"

#

even if you manage to get everything out, you'll need what comes before the "

#

example

earnest phoenix
#

i do

opal plank
#

if someone doesnt set a description, and you have it setting the title first, i'll set the title as the description

#

making a regex to capture everything before and after can be a bit slow

earnest phoenix
#

@nocturne valve

#

how slow?

#

@nocturne valve

#

how do i ping hi m

#

or go to his profiel

opal plank
#

i still think a switch case there with startsWith would be a much better approach

slender thistle
#

STOP MISUSING THIS CHANNEL

#

LAST WARNING

earnest phoenix
#

its related t odevelopement

#

i said how do i piing him

#

or message him

slender thistle
#

That's not coding

earnest phoenix
#

It's not development related

#

what if i use that in development

#

Stop

slender thistle
#

^

earnest phoenix
#

can i get answer to it? and ill stop

slender thistle
#

No

earnest phoenix
#

No

#

You'll stop

#

rude

slender thistle
#

If you keep pushing your luck, you will be muted.

earnest phoenix
#

@nocturne valveokden

hearty wind
#

wow you guys are very lenient.

slender thistle
#

Just me

hearty wind
#

im a mod in a stock server with around 30k users, and he woulda been banned by now.

#

very lenient in here. im surprised.

slender thistle
#

Please keep this channel on topic

hearty wind
#

yes.

earnest phoenix
#

how is that lenient? are you dumb? i would have been banned just by using the wrong channel? no warn or nothing?

#

what kind of server is it

#

that has 30k members and doesnt know how to moderate

slender thistle
#

Ran out of chances

earnest phoenix
#

lol

opal plank
#
let args = message.content.split(' ')
let embed = {}
for (a of args) 
switch(a.toLowerCase()) {
case 'description': 
  embed.description = a.splice( description.length)

case 'title' : 
//same thing

keep iterating
}```
@earnest phoenix
#

somethnig along those lines

earnest phoenix
#

In 7 october if your bot wont have 75 guild it will close is it true

opal plank
#

no

#

the only change is bots not verified cant join 100+ servers

#

thats all

slender thistle
#

Can we please read channel topics before asking our questions

earnest phoenix
#

Ok sorry

slender thistle
#

#general will be more fit for your question

hearty wind
#

Man im never making any progress on this emoji reaction counter.

#

any advice to dumb it down?

opal plank
#

i sent you a guide, did i not?

slender thistle
opal plank
#

ah i see

#

out of my area then

hearty wind
#

its python. and i read the docs. the logic is the problem. for me.

slender thistle
#

What's the issue, again?

hearty wind
#

it just needs to count the emojis and edit the message to show what the count is next to it. cause im using it for percentages.

slender thistle
#

Restricted to thumbsup and thumbsdown only?

hearty wind
#

yes. it only does it. ill show you a screenshot.

#

i just need the 2 to be next to the thumbs up and thumbs down.

earnest phoenix
#

How I add bot to discordgg

slender thistle
#

sigh

hearty wind
#

LOL

earnest phoenix
#

Oo

slender thistle
#

Starman you handle this please

hearty wind
#

i felt that sigh haha.

sinful belfry
earnest phoenix
#

K

hearty wind
#

anyway. the algo just edits it non stop.

#

updating it. cause its being used as a percentage.

slender thistle
#

Send your code again please

hearty wind
#

sure i botched it so bad now trying to fix it so.

slender thistle
#

Oh

hearty wind
#
    message = await ctx.send("**----POLL----** \n \n**Green Today?** :thumbsup: \n \n**Red Today?**   :thumbsdown:")
        for emoji in ('👍', '👎'):
            await message.add_reaction(emoji)
        thumbs_up_count = 0
        thumbs_down_count = 0
        for second in range(60):
            message_id = await message.channel.fetch_message(message.id)
            for reaction in message_id.reactions:
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.emoji.count
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.emoji.count
                await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?**   :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))
                await asyncio.sleep(3)
#

the built in method count is a new thing yesterday it was showing 0 so idk how the hell that changed lol.

slender thistle
#

You mean reaction.count

hearty wind
#

see it adds a thumbs up and down so people can decide immediately.

#

and i just need it to display what people chose next to it. which is shown in the edit message.

slender thistle
#

I'm not exactly sure what- oh wait .emoji is a string in your case

#
>>> "test test test YEEE".count("test")
3
#

yeah

#

Makes sense

hearty wind
#

im not understanding what ur saying apologies.

#

how is that related to the bug?

slender thistle
#

Use reaction.count instead of reaction.emoji.count

#

Because your reaction.emoji is a string, you are trying to access a string object's count method

#

And you want to see how many times a reaction was used, correct?

stark abyss
#

how do i call "message" or "args" in function that i am module exporting?

#
const gifs = function(args, command){
    args = message.content
      .trim()
      .split(/ +/g);

    if(message.mentions.users.first() == undefined){
      return message.channel.send("You didn't mention the user!")
    }

    if(args[3] != undefined){
      return message.channel.send(`Incorrect useage! Please do ${prefix} ${command} [@user]`)
    }

    var userID = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
    var username = userID.user.username;  
}

module.exports = {gifs};```
hearty wind
#

@slender thistle Yes that fixed the <object error> thing !!

slender thistle
#

Splendid

hearty wind
#

its still not the right count, but we moving in the right direction.

stark abyss
#

nice

#

so anyone can help me?

hearty wind
#

its some logic thing. i just need to understand async. stuff. i think.

slender thistle
#
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.count
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.count
#

See anything suspicious?

stark abyss
#

is count a thing?

slender thistle
#

Actually...

stark abyss
#

am sorry shiv but u have any idea on how to help me?

slender thistle
#

I assume that's what your code is like currently, @hearty wind?

hearty wind
#

yes

slender thistle
#

Nope, never spoke JS

stark abyss
#

okay

hearty wind
#
@client.command()
async def poll(ctx):

    if str(ctx.author) == "penche#7432" or str(ctx.author) == "SWAGHETTI#7791" or str(ctx.author) == "Winter#7588":
        message = await ctx.send("**----POLL----** \n \n**Green Today?** :thumbsup: \n \n**Red Today?**   :thumbsdown:")
        for emoji in ('👍', '👎'):
            await message.add_reaction(emoji)
        thumbs_up_count = 0
        thumbs_down_count = 0
        for second in range(60):
            message_id = await message.channel.fetch_message(message.id)
            for reaction in message_id.reactions:
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.count
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.count
                await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?**   :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))
                await asyncio.sleep(3)

full method.

stark abyss
#

well if someone can help me please ping me

slender thistle
#

You excluded the thumbsdown emoji from your condition

stark abyss
slender thistle
#

You are only checking for the thumbsup

hearty wind
#

oh yeah i fixed that sorry