#development

1 messages · Page 1437 of 1

earnest phoenix
#

if (message.author.bot) return;

pale vessel
#

You can clone an array by using const cloneArray = [...originalArray];

earnest phoenix
spare urchin
#

@pale vessel

#

its correct

#

client:on('messageCreate', function(message)
discordia.extensions()
local client = message.client
local guild = message.guild
local args = message.content:split(" ")
local command = table.remove(args, 1)
local test = "tak"
if command == "?ban" then
local Member = message.member
if Member:hasPermissions("ADMINISTRATOR") == true then
local nick = table.concat(args, " ")
local nicktwo = "test"
if nick and string.match(nick, "<@!%d+>") then
print("Ban ".. string.sub(nick, 4,-2))
nicktwo = string.sub(nick, 4,-2)
elseif nick and string.match(nick, "<@%d+>") then
print("Ban "..string.sub(nick, 3, -2))
nicktwo = string.sub(nick, 3, -2)
elseif nick and string.match(nick, "%d+") then
print("Ban ".. string.match(nick, "%d+"))
nicktwo = string.match(nick, "%d+")
else test = "nie"
end
local User = client:getUser(nicktwo)
local UserTwo = guild:getMember(nicktwo)
User:send('Otrzymujesz bana na serverze nazwa servera')
guild:banUser(nicktwo)
message.channel:send {
content = " " .. nick .. " został zbanowany.",
}
User:send('dostałeś bana!')
end
if test == "nie" then
message.channel:send {
content = "Niepoprawna nazwa użytkownika!",
}
end
else message.channel:send {
content = "Nie posiadasz uprawnień do banów!",
}
end
end
end)

pale vessel
#

That grabs all elements from the original array and put it inside the new array, creating a clone

carmine summit
#

whats the differencce

#

of using newarr = oldarr

pale vessel
#

If you define it like you did, it only creates a reference to the original array

earnest phoenix
#

what use that

#

if (message.author.bot) return;

pale vessel
#

So if you modify that variable, it also modifies the original one

#

Since you're basically creating a reference of the original array instead of cloning it

earnest phoenix
#

if (message.author.bot) return;

spare urchin
#

Can someone help me?

#

with

#

client:on('messageCreate', function(message)
discordia.extensions()
local client = message.client
local guild = message.guild
local args = message.content:split(" ")
local command = table.remove(args, 1)
local test = "tak"
if command == "?ban" then
local Member = message.member
if Member:hasPermissions("ADMINISTRATOR") == true then
local nick = table.concat(args, " ")
local nicktwo = "test"
if nick and string.match(nick, "<@!%d+>") then
print("Ban ".. string.sub(nick, 4,-2))
nicktwo = string.sub(nick, 4,-2)
elseif nick and string.match(nick, "<@%d+>") then
print("Ban "..string.sub(nick, 3, -2))
nicktwo = string.sub(nick, 3, -2)
elseif nick and string.match(nick, "%d+") then
print("Ban ".. string.match(nick, "%d+"))
nicktwo = string.match(nick, "%d+")
else test = "nie"
end
local User = client:getUser(nicktwo)
local UserTwo = guild:getMember(nicktwo)
User:send('Otrzymujesz bana na serverze nazwa servera')
guild:banUser(nicktwo)
message.channel:send {
content = " " .. nick .. " został zbanowany.",
}
User:send('dostałeś bana!')
end
if test == "nie" then
message.channel:send {
content = "Niepoprawna nazwa użytkownika!",
}
end
else message.channel:send {
content = "Nie posiadasz uprawnień do banów!",
}
end
end
end)

pale vessel
#

Can you not repost that?

spare urchin
#

the cmd think it's incorrect

pale vessel
#

Please be patient

carmine summit
#

cmd

spare urchin
#

yes

#

xD

carmine summit
#

reposted like 3 times

#

outside a code block

#

wth?

spare urchin
#

yes

earnest phoenix
#

how to add vc empty and bot dis. auto. ?

#

automatic dis. when vc is empty

spare urchin
#

ssry

#

i can't

bold granite
#

I NEED HELP OMG

earnest phoenix
#

2020-12-09T08:19:10.775375+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 25) 2020-12-09T08:19:30.511739+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Error: Video unavailable 2020-12-09T08:19:30.511749+00:00 app[worker.1]: at Object.exports.playError (/app/node_modules/ytdl-core/lib/utils.js:116:12) 2020-12-09T08:19:30.511749+00:00 app[worker.1]: at downloadFromInfoCallback (/app/node_modules/ytdl-core/lib/index.js:72:19) 2020-12-09T08:19:30.511753+00:00 app[worker.1]: at /app/node_modules/ytdl-core/lib/index.js:20:5 2020-12-09T08:19:30.511753+00:00 app[worker.1]: at runMicrotasks (<anonymous>)

earnest phoenix
#

yah

bold granite
#

what error

earnest phoenix
#

^^^^

carmine summit
#

smh

#

this guy sent the error.. but its not the error code that we need

#

we need the error that showed before that error

#

if that makes any sense

bold granite
#

^^

bold granite
#

is it undefined?

#

missing module

#

what?

split siren
pale vessel
#

You need to parse it as a number first

#

Number(multiplier).toFixed(2)

split siren
#

ohh let me try

pale vessel
#

Never mind, it would have errored

split siren
#

Yeah

pale vessel
#

Can you show your code?

earnest phoenix
#

When I left the vc, then my bot also left the vc

#

why

strong sand
#

didnt you mean parseFloat("123.456").toFixed(2); (if your using NodeJS)

pale vessel
#

Both work

fair axle
#

Maybe you can use rounding

strong sand
#

never used Number before i prefer just using the specified data types

split siren
#

(Math.round(num * 100) / 100).toFixed(2); this worked

pale vessel
#

What did you do before?

#

The one that you said didn't work that had toFixed(2)

fair axle
strong sand
#

just as long as it's Double#toFixed or Float#toFixed or even Long#toFixed the method should work but if its String#toFixed or Integer#toFixed youll get an error before those methods dont exist for those data types

#

The method he used with Math.round returns a Long which is why toFixed worked; it's just about getting it to the right data type, which is why we have methods like parseInt parseDouble etc to make things like this easier

earnest phoenix
#

When I left the vc, then my bot also left the vc

#

how to deny it

#

how to add alltime on vc

#

js

ivory seal
#

how can u check how long someone was there in a vc.
i thought of using "voiceStateUpdate" but its called even when a user unmutes and mutes so i can't know if a user is unmuting or leaving

summer torrent
#

it emits on voice channel joins/leaves too

ivory seal
#

ye but is there any way to differenciate if a person is join/leaves or muting/unmuting?

#

or am i doing the tracking completely wrong

earnest phoenix
#

if joined the channel on the second voicestate is going to be defined

ivory seal
#

wdym?

earnest phoenix
#

while the channel on the first voice state is going to be null

#

for leaving it's vice versa

ivory seal
#

but what abt mute

#

when a person mutes/unmutes it messes up the voice states

earnest phoenix
#

go see the docs for the voicestate object

ivory seal
#

i did

earnest phoenix
#

it probably has a mute property

ivory seal
#

it odes have .selfmuite

#

but should i check it for the first or second?

earnest phoenix
#

well

#

it's a boolean

#

a boolean only has two states

slender wagon
#
member.ban(`${reason}`).catch(err => { 
        message.channel.send('Something went wrong')
          console.log(err)
      })
#

when i try this it throws an error

#
DICT_TYPE_CONVERT: Only dictionaries may be used in a DictType```
earnest phoenix
#

if they muted or unmuted, selfmute is going to be inverted

ivory seal
#

no should i check the selfmute property for the first state or the second state

#

ik its a boolean

earnest phoenix
#

think about why i said that

ivory seal
#

kk

slender wagon
#

is there anything i can do to solve my issue

earnest phoenix
#

it's either true or false

broken sentinel
earnest phoenix
#

there is nothing in between, so only two possible states

#

fuck off @broken sentinel

broken sentinel
#

wow

slender wagon
#

wrong channel

earnest phoenix
#

if they muted or unmuted, the selfmute property is going to be the inverted on the second state @ivory seal

ivory seal
#

ah kk

#

thanks

slender wagon
#

ok so i just noticed something

#

when i remove the reason from my ban command it works

#
member.ban().catch(err => { 
        message.channel.send('Something went wrong')
          console.log(err)
      })
#

this works properly

#
member.ban(`${reason}`).catch(err => { 
        message.channel.send('Something went wrong')
          console.log(err)
      })
#

but this doesn't

earnest phoenix
#

What is reason defined as

slender wagon
#
 let reason = args.slice(1).join(" ");

      if(!reason) reason = 'Unspecified';
ivory seal
#

aren't u supposed to do

#

{reason:reason}

slender wagon
pale vessel
#

Yeah

#

ban({ reason });

slender wagon
#

okay that worked

#

thanks a bunch

zealous dew
#

is there anyway I can dev and test webhook on local enviroment

lusty quest
#

i know. but Mobile does. and i like this one

slender wagon
#

i got a lil confused on the docs, is member.roles.highest a V11 thing or is it from V12

lusty quest
#

docs should be V12 by now

#

since V11 is deprecated now for 2 months

slender wagon
#

oh okay yeah i got this working

past crypt
#

{
"resource": "/d:/bot/index.js",
"owner": "typescript",
"code": "1005",
"severity": 8,
"message": "'}' expected.",
"source": "ts",
"startLineNumber": 177,
"startColumn": 73,
"endLineNumber": 177,
"endColumn": 73,
"relatedInformation": [
{
"startLineNumber": 97,
"startColumn": 24,
"endLineNumber": 97,
"endColumn": 25,
"message": "The parser expected to find a '}' to match the '{' token here.",
"resource": "/d:/bot/index.js"
},
{
"startLineNumber": 83,
"startColumn": 27,
"endLineNumber": 83,
"endColumn": 28,
"message": "The parser expected to find a '}' to match the '{' token here.",
"resource": "/d:/bot/index.js"
},
{
"startLineNumber": 9,
"startColumn": 29,
"endLineNumber": 9,
"endColumn": 30,
"message": "The parser expected to find a '}' to match the '{' token here.",
"resource": "/d:/bot/index.js"
}
]
}

#

why it this proplam?

hazy sparrow
#

@past crypt use a code block

past crypt
#

{
"resource": "/d:/bot/index.js",
"owner": "typescript",
"code": "1005",
"severity": 8,
"message": "',' expected.",
"source": "ts",
"startLineNumber": 102,
"startColumn": 1,
"endLineNumber": 102,
"endColumn": 2
}

near stratus
#

bruh

past crypt
#

?

near stratus
past crypt
#

it .js

#

index.js

near stratus
#

I can't watch like this
I'm highlighting it

#
{
    "resource": "/d:/bot/index.js",
    "owner": "typescript",
    "code": "1005",
    "severity": 8,
    "message": "'}' expected.",
    "source": "ts",
    "startLineNumber": 177,
    "startColumn": 73,
    "endLineNumber": 177,
    "endColumn": 73,
    "relatedInformation": [
        {
            "startLineNumber": 97,
            "startColumn": 24,
            "endLineNumber": 97,
            "endColumn": 25,
            "message": "The parser expected to find a '}' to match the '{' token here.",
            "resource": "/d:/bot/index.js"
        },
        {
            "startLineNumber": 83,
            "startColumn": 27,
            "endLineNumber": 83,
            "endColumn": 28,
            "message": "The parser expected to find a '}' to match the '{' token here.",
            "resource": "/d:/bot/index.js"
        },
        {
            "startLineNumber": 9,
            "startColumn": 29,
            "endLineNumber": 9,
            "endColumn": 30,
            "message": "The parser expected to find a '}' to match the '{' token here.",
            "resource": "/d:/bot/index.js"
        }
    ]
}
pale vessel
#

That looks like a json file

wicked pivot
#

you know of an API that formats numbers this way

-1000

-1k

pale vessel
#

There's most likely a package for it, an API for it would be unnecessary

valid grotto
restive furnace
#

just a suggestion

pale vessel
#

Epic coder moment

merry remnant
#

anyone ?

pale vessel
#

You need an actual image URL

#

The URL you used points to the website

#

Let me grab the image for you

earnest phoenix
#

how do i get message ID in a channel, djs

pale vessel
#

Get the message first

earnest phoenix
#

i cant figure it out in new djs

pale vessel
#

You can get the id property from a message

earnest phoenix
#

ye but its old message

#

not loaded

pale vessel
#

Fetch the message

earnest phoenix
#

how

pale vessel
#

channel.messages.fetch(id)

merry remnant
#

how did you do it please enlighten me @pale vessel

pale vessel
#

Right click the image on the website and copy the URL

earnest phoenix
#

it doesnt show .messages

pale vessel
#

cache.get won't work Looking at something else

#

Since you said that it's an old message

#

It won't be cached

#

Ah wait

#

It should be fine

earnest phoenix
#

ok so its a message in a channel, how do i get it directly from client on ready

merry remnant
#

thanks alot really

pale vessel
#

Messages are inside channels

#

You can't get a message without its channel

earnest phoenix
#

i did get its channel

#

but it wont show .messages

pale vessel
#

Just type it?

#

It should work

earnest phoenix
#

see

pale vessel
#

Show your code

#

Again, the message isn't cached

#

It's an old message

#

It won't find it, you need to fetch it:js const message = await ch.messages.fetch("id"); message.react();

#

Fetch returns a promise so you need to resolve it using await

earnest phoenix
pale vessel
#

await it

quartz kindle
#

await...

earnest phoenix
#

works like this

quartz kindle
#

if you're doing that way, you dont need var msg lol

earnest phoenix
#

ye ik, just testing

quaint peak
#

skeet

earnest phoenix
#

you can also remove async/await from the then

#

since you aren't doing anything else

#

there's no point in blocking

#

but, heres the main problem

quaint peak
#

mobile status

earnest phoenix
#

modify the lib

#

listening for reactions on old message

#

enable partials

#

tldr

#

by default djs sends you events only if the entity is in cache

#

so djs by nature caches everything known to man

#

ye ye but it doesnt get old message reactions

#

only new

#

that's where partials come in

#

partials allow you to receive the event about the entity even when it isn't in cache (i.e. old messages)

#

see the doc link

#

im reading rn

#

tnx

#

can someone tell me the error?

#

oh and i already changed the token

pale vessel
#

Great job

sand condor
#

().toLowerCase

sudden geyser
pale vessel
#

You're up early

sudden geyser
#

school days™️

#

though I don't have school today

pale vessel
#

Almost thought you were referring to the anime.

earnest phoenix
#

you mean to tell me you still understand the concept of time?

#

smh

sudden geyser
#

partly because I always end up waking up late and don't have enough time to get ready properly

earnest phoenix
#

app.get('/', (req, res) => {what i need to put instead of / so that if someone goes to wrong place it will get like if someone goes at a link on my web that dosent exists

#

see "how do i handle 404 responses"

crimson vapor
#

what do you mean exactly?

earnest phoenix
#

@earnest phoenix can i do send file in this ?

pale vessel
#

what

#

You want to send a file on 404?

crimson vapor
#

you mean like res.sendFile()

earnest phoenix
#

yes

earnest phoenix
crimson vapor
#

what are you making that requires a file on 404

earnest phoenix
#

it literally

pale vessel
#

just do that on 404 yea

earnest phoenix
#

says how to do that

#

in the doc page

#

please

#

if you just took a minute to read it

#

i am watching yt tutorial @earnest phoenix

#

🚶‍♂️

#

youtube live stream play support requirment?

crimson vapor
#

reading docs is better tbh

earnest phoenix
#

wth

#

i am gonna make blog with express weirdsip

#

what you said has the meaning equivalent of saying something like
ramen chicken noodle soup?

#

literally makes no sense

#

lol

#

F

#

explain what you're asking for and provide context with your question

restive furnace
#

or just react or vue

pale vessel
#

I wouldn't say "easier" lmao

earnest phoenix
#

i mean

#

using SSR for something like a blog makes sense

#

you get the advantage of easily doing SEO

#

granted react has pre-renderers

#

but still not as powerful as SSR'd sites

midnight blaze
#

So I was trying to learn more about sharding, but all I get are articles to databases, how exactly is sharding working for a nodejs project? I am sharding my bot, but I would like to know, how it works.

earnest phoenix
midnight blaze
#

hmm ok

#

thanks

earnest phoenix
#

as for sharding with your library, you should check out your lib's docs

#

Use the format objects returned from ytdl.getInfo to download specific streams to combine to fit your needs

#

means

#

ytdl-core

#

yo wasssszzzaaaupp

#

^^

crimson vapor
#

I agree

earnest phoenix
#

bitwise shift

#

it shifts bits to the right

#

wdym

#

...what else would i mean

#

converts the number to binary then moves all bits to the right?

#

all numbers are actually in binary, but in a nutshell yes

#

link me an mdn page

#

it shifts the bits by the amount that you tell it to shift

#

why would anyone want to do that tho

#

performance

#

Anyone know how to make a bot work 24/7 on mobile?

tired panther
#

@earnest phoenix Why do u want it on mobile?

earnest phoenix
#

Cuz I am lol...

tired panther
earnest phoenix
tired panther
#

when you a are a good deb you use db

earnest phoenix
gilded olive
#

Heroku is a bad idea

#

Im warning you now lol

earnest phoenix
#

Lol

tired panther
earnest phoenix
gilded olive
#

Just wait

tired panther
earnest phoenix
#

@tired panther heroku is terrible for bot hosting

gilded olive
#

You'll see "fine"

earnest phoenix
#

read the pins of thsi channel

#

@earnest phoenix what’s the best one?

tired panther
earnest phoenix
#

read this

tired panther
#

heroku has a ping of 35 ms

earnest phoenix
#

oh fuck i pinged matt
but who cares ¯\_(ツ)_/¯

#

Who’s that?

#

Lol

tired panther
valid grotto
earnest phoenix
#

Oh

tired panther
earnest phoenix
#

heroku is NOT MEANT for bot hosting

#

im a mobile dev ;).

valid grotto
tired panther
tired panther
gilded olive
#

"but it works"

earnest phoenix
#

Lol

carmine summit
valid grotto
#

Why would you? If you're using a credit card, why not go for AWS? Google? DigitalOcean?

tired panther
gilded olive
#

Dude

#

The point is

earnest phoenix
#

yeah yeah a spacejunk satellite from an alien planet that fell on earth probably still has communication technologies and they work "fine"

gilded olive
#

Heroku is not good for bot hosting

#

Defending it is useless

carmine summit
#

Heroku couldn't survive a 100 for loop

earnest phoenix
gilded olive
#

If your bot gets big and is handling a lot of requests every second heroku will zap your app instantlt

#

Maybe even before that

earnest phoenix
earnest phoenix
gilded olive
#

👍

valid grotto
#

Then why heroku?

earnest phoenix
tired panther
#

Why should a mobile dev have a big bot?

earnest phoenix
#

Why shouldn’t they?

carmine summit
#

Replit better 👍

tired panther
carmine summit
#

With a bit of npm i express

earnest phoenix
#

Wdym?

earnest phoenix
carmine summit
#

And a lil bit of uptimerrobot

earnest phoenix
#

no free host is good

earnest phoenix
valid grotto
tired panther
gilded olive
earnest phoenix
#

@earnest phoenix it’s for mobile devs

earnest phoenix
valid grotto
earnest phoenix
tired panther
#

yes, but you need a device, which will ping on the page

earnest phoenix
#

Bot designer for discord @earnest phoenix

sudden geyser
carmine summit
earnest phoenix
carmine summit
#

I could also read/write at a speed of 500mbps

earnest phoenix
#

@tired panther show me ur bot

valid grotto
earnest phoenix
#

@sudden geyser thank you

#

Then why r u saying that mobile people shouldn’t have big bots @tired panther

tired panther
earnest phoenix
#

@earnest phoenix sup shin Shan

#

@carmine summit repl is a testing IDE they literally have to be that else it's pointless

earnest phoenix
#

heroku is for building space trash

#

@earnest phoenix not well wbu

#

repl without hacker plan is completelt trash

tired panther
#

do you mean mobile dev? on a mobile

carmine summit
#

Phone: 8GB ram
Laptop: chilling at 4GB ram

earnest phoenix
#

Cuz I can show u my bot if u want @tired panther and it’s builds fully on mobile

#

@earnest phoenix why not D:? I just watch shin Shan lol

tired panther
#

xD

gilded olive
#

Interesting

earnest phoenix
#

huh

#

Want screen shots?

restive furnace
tired panther
carmine summit
#

Nahhhhhhhhhhhhh

earnest phoenix
#

@tired panther lemme show you let’s see

restive furnace
#

i have pretty decent one and still 3gb

tired panther
sudden geyser
#

flagship 12gb ram smartphones omegalul

tired panther
earnest phoenix
#

@tired panther

#

@sudden geyser this is development chnnael

#

I’m iPad 128gb 7th generation @tired panther

tired panther
#

then its okay

sudden geyser
#

I hate the web and don't have much experience with express/html & css

earnest phoenix
#

@earnest phoenix this is development channel move !1111111111

tired panther
#

I thought a cellphone developer xD

earnest phoenix
#

Lol

#

Phones to small..

carmine summit
#

Meanwhile on phone:

Comsolw.lof()
earnest phoenix
#

Hey am

gilded olive
earnest phoenix
#

Lol

valid grotto
#

Word your question better @earnest phoenix

carmine summit
#

Also. Having a keyboard that adds a space and after a period sucks

earnest phoenix
#

If i sent an invite to my friend to join my team as admin, where may him accept that invite?

gilded olive
#

email I believe

tired panther
#

probably, there are programms

carmine summit
#

Phones too 720p

#

Phones too smooth

#

They no hab texture

gilded olive
#

wait why are you coding on mobile fr 🗿 @earnest phoenix

carmine summit
#

And touchscreen makes it more difficult

earnest phoenix
#

@gilded olive why not works like any bot?

gilded olive
#

interesting

earnest phoenix
earnest phoenix
#

It’s like all other bots...

crimson vapor
#

why do you need a phone more than 720?

#

the pixel density is so high

carmine summit
#

@earnest phoenix stfu

crimson vapor
#

why does it matter

earnest phoenix
sudden geyser
#

cry has become a bot

earnest phoenix
#

we don't have tiny ass displays anymore lol

earnest phoenix
#

I think

carmine summit
restive furnace
earnest phoenix
#

@earnest phoenix it is but tho it’s almost the same I don’t see any difference

#

wbu vps ? @carmine summit

carmine summit
#

ITS NOT SAME

carmine summit
#

Its more comfortable working on a laptop

crimson vapor
#

my 24'' display is 1080 so why do I need a 6'' screen that is the same resolution

earnest phoenix
#

That's the difference

#

i bought a thonkpad thinking i'm going to use it for programming on the go

#

i only use it to watch netflix now

#

lol

#

Yea but I mean I don’t think my bot is any different then others @earnest phoenix

earnest phoenix
#

i-

#

i hope you're joking

#

no

#

embarrassing

#

^^^ this bot was made on IPad @earnest phoenix and I made it so what’s the difference LOL?

carmine summit
#

@earnest phoenix give specs

tired panther
earnest phoenix
#

it's a t14

gilded olive
#

that's not hard to do really @earnest phoenix

#

xD

carmine summit
#

@earnest phoenix IMAGINE USING IOS

gilded olive
#

it's just that you did it on mobile

#

also really...why?

earnest phoenix
#

@carmine summit stfu get a life man stop judging other by their devices

tired panther
#

@earnest phoenix Which Ide do u have?

gilded olive
#

LOL

earnest phoenix
#

Wha?

carmine summit
#

Its just that apple don't know how to make a filesystem

tired panther
#

devlopment environment, the software to code

earnest phoenix
#

Wtf, then how do you think I made that bot..

gilded olive
#

you can with vs code

#

you have to run a local server then connect it

#

blah blah

tired panther
#

I wanted to know with which one ?

earnest phoenix
#

This is just one of the commands like ban i coded

tired panther
#

whats programm is it?

gilded olive
earnest phoenix
#

@gilded olive LOL

#

@earnest phoenix lmfaoo you use bdfd

#

lolllll

valid grotto
#

Oh.. BDFD..

earnest phoenix
#

Bdfd?

carmine summit
#

What bdfd?

earnest phoenix
#

What’s wrong with that

#

No shards loll

#

Lol

#

@earnest phoenix you know whats shards ?

valid grotto
#

I thought you're actually coding it.. Oh...

earnest phoenix
#

ofc not

carmine summit
#

That's why you don't code on IOS

valid grotto
#

Well that's disappointing

earnest phoenix
#

@earnest phoenix well yea but idk I call it coding LOL

tired panther
#

which language is it?

valid grotto
#

It's called no-code

tired panther
earnest phoenix
#

@tired panther its not languge lmao

#

Well that’s what you got on mobile

#

I can’t afford pc ok?

valid grotto
#

Well that's certainly very disappointing

earnest phoenix
#

** I can’t afford pc ok?**

carmine summit
#

Of its bot designer

tired panther
valid grotto
#

Is your brain okay? I'm not talking about myself.

earnest phoenix
#

@earnest phoenix you have termux too lmao... why using this shit ?

tired panther
tired panther
earnest phoenix
#

@earnest phoenix haven’t heard of it

#

lmfao .. you know bdfd but not termux

#

wow

#

big brain

#

But it isn’t in the App Store....

#

🤦‍♂️

#

@earnest phoenix ever seached it ?

#

Yes I did rn

tired panther
#

There are programms in which you can code with js

earnest phoenix
#

It’s prob for android...

valid grotto
#

You should've said it in the first place that you're using a bot maker lol @earnest phoenix

earnest phoenix
#

yellow burns my eyes

#

thats why android are better than ios @earnest phoenix

#

lmfao

gilded olive
#

"wix"

tired panther
valid grotto
earnest phoenix
#

@earnest phoenix and that’s why android is unsafe

#

🤦‍♂️

gilded olive
#

it's nice just too yellow

#

brrr

earnest phoenix
#

Lol

#

@earnest phoenix who the hell say that to you ?

#

lmao

earnest phoenix
#

android are better than ios

gilded olive
#

yes

earnest phoenix
#

I agree but unsafe

gilded olive
#

how

fair heart
#

Is this among us discord?

earnest phoenix
#

second name of trash is ios

gilded olive
#

no

#

bruh

#

how

#

do

#

...

earnest phoenix
#

@earnest phoenix dude stfu

gilded olive
#

nah ios is bad

earnest phoenix
#

Yea, but I got a android it’s just my phone,

#

@earnest phoenix does it work on android phones?

#

Or tablets only?

earnest phoenix
earnest phoenix
valid grotto
#

Yikes you have a developer emoji on your status, but you're using a bot maker 🤦‍♂️

gilded olive
#

LOL

earnest phoenix
#

android have better security than ios

carmine summit
#

K

earnest phoenix
#

@valid grotto it’s called nitro

sudden geyser
earnest phoenix
#

Lmfao

carmine summit
#

Imagine using a bot maker

earnest phoenix
#

Lol

tired panther
gilded olive
#

botghost verycool

tired panther
earnest phoenix
tired panther
valid grotto
gilded olive
earnest phoenix
#

@valid grotto so? I just like it what’s the problem innit?

carmine summit
earnest phoenix
tired panther
earnest phoenix
#

nobody likes them

#

I MADE THIS BOT

#

When did I say that...

#

bitch you ain't making anything you're a script kiddie

#

Why y’all getting pissed

#

(that wasn't directed at you, but people using bot makers in general)

#

@earnest phoenix 1. Be friendly and respectful to everyone

#

you're annoying

carmine summit
#

Downside of making a bot by a bot builder:
You cannot make a game like Snake using discord.js

gilded olive
#

cry on a speedrun

earnest phoenix
#

@gilded olive you’ve heard of termed?

#

Termux *

gilded olive
#

what is that @earnest phoenix

earnest phoenix
#

we all
@earnest phoenix

valid grotto
earnest phoenix
#

the whole point of programming is to... make anything you want

#

be free, it's your world

#

@valid grotto so how does this termux work?

#

Thanks ^^

valid grotto
gilded olive
#

oh he's using a bot maker...

#

oh no....

#

...

#

-100 respect

earnest phoenix
#

Sigh...

#

@gilded olive 1. Be friendly and respectful to everyone

gilded olive
#

how was that disrespectful?

earnest phoenix
#

-100 respect

#

stop minimodding

#

you're annoying

#

we all @earnest phoenix

pale vessel
#

so cringe

gilded olive
#

that's not disrespectful at all

earnest phoenix
#

we all what

#

@gilded olive yes it was if someone using botmaker its fine

gilded olive
#

no it's not

#

but you do you

earnest phoenix
#

yes its fine

gilded olive
#

you'll call yourself a developer after using a bot maker?

#

don't make me laugh dude come on now lol

valid grotto
#

Backseat moderating? Kinda cringe my g @earnest phoenix

earnest phoenix
#

would you agree with someone who calls themselves a doctor just because they managed to complete Operation without triggering the buzz?

valid grotto
#

@earnest phoenix It's alright man, I'm guilty myself of using no-code applications, but you gotta learn how to properly code if you want to call yourself a developer.

earnest phoenix
#

@gilded olive dude what’s the raging for? It’s not like it’s prebuilt I have to kinda make a puzzle it’s not like it’s already in there

#
app.get("*", (req, res) => {
	res.redirect("https://discord . gg/qc4b3qpZtk");
});

i get a This page redirected you too many times error when I try to visit the website and the URL becomes literally just <root>/discord.gg/discord.gg/discord.gg and so on

gilded olive
#

raging? I am calm as ever

earnest phoenix
#

U aint

gilded olive
#

how so?

earnest phoenix
#

Idk LOL

gilded olive
#

exactly..

earnest phoenix
#

@mods emote spam bean bean bean

#

@valid grotto how do I learn coding on iPad LOL? Specially on ios

gilded olive
earnest phoenix
earnest phoenix
#

@gilded olive what’s that?

gilded olive
#

look at your question

#

and then tell me what you think

earnest phoenix
#

Sure....

sudden geyser
#

You should use a laptop/desktop if you want to code.

gilded olive
#

he can't afford one( what he said)

valid grotto
earnest phoenix
#

@gilded olive so how Do I connect my bot with the coding?

sudden geyser
#

ah yes, auger

gilded olive
#

no idea

tired panther
gilded olive
#

you really need a laptop

sudden geyser
gilded olive
#

or get an android

earnest phoenix
#

redirect(301, uri)

tired panther
sudden geyser
earnest phoenix
#

ok

sudden geyser
#

still painful

earnest phoenix
#

iirc by default the code is 302

tired panther
sudden geyser
#

coding on mobile in general is not a pleasant experience

#

You have many more proper tools and an experience than coding on a mobile.

earnest phoenix
#

still no work

#

hm

#

i dont get it why it thinks its a relative path

sudden geyser
#

What, does your Android app include auto-completion? maybe, maybe not.

earnest phoenix
#

does it still happen when you redirect to something like google

#

i included the http protocol in it too

earnest phoenix
gilded olive
#

my oh my

#

long link

earnest phoenix
#

@tired panther you literally leaked a google travker

tired panther
gilded olive
#

learn a programming language first, python or javascript (if you are going for bot dev)

#

then move on

earnest phoenix
#

BRUH IT WAS REPL'S FAULT

#

It didn't save my file earlier

tired panther
#

in bing you do not become yt ads

sudden geyser
#

It may work, but it's not going to be a good experience. It's like writing your code by hand then transferring it over to your files. No one does it because it's not a good experience, unless those employers are trying to see how much you can suffer while solving problems like fizzbuzz

earnest phoenix
#

And the only part saved was when i forgot to include the http protocol so it defaulted to a relative path

sudden geyser
#

There's a reason you don't find support for code editors and IDEs like Emacs, VSC, IntelliJ, etc.

earnest phoenix
#

not only that but libs were not designed for and are not optimized to run on ARM

#

@tired panther little bit of your computer browser data is sent in every google search URL

earnest phoenix
#

that's why you should always remove every single url query except the q

#

fortunately for you, google tracks way more than that!!

gilded olive
#

google knows all

sudden geyser
#

you could stare at a plant for 5 seconds and I guarantee you'll get ads for plant pots

earnest phoenix
#

data is the most valuable resource

#

🤷‍♂️

#

you're fooling yourself if you're thinking you have any sort of privacy nowadays

tired panther
gilded olive
#

you can view them

carmine summit
#

is function(data), same as data.function()?

earnest phoenix
#

what

#

in terms of functionality, no

carmine summit
#

how does it work?

earnest phoenix
#

the former is a method that takes a parameter, the latter is a method that takes no parameters and it is on an object

carmine summit
#

ah that makes more sense now

hasty mulch
#

How can I restrict a command to Patreon supporters only in Python?

carmine summit
#

btw when using function(data1, data2) can it be interchangable?

earnest phoenix
#

nope

gilded olive
carmine summit
#

like function(data1, data2) to function(data2, data1)

#

do they act the same?

quartz kindle
#

no

gilded olive
#

why fuck?

#

db is essential

hasty mulch
#

Dbs confuse me

gilded olive
earnest phoenix
#

you don't need a database per se

#

just making calls to the patreon api

hasty mulch
#

Like idk how to call it and all that

earnest phoenix
#

which is a disaster

#

patreon has one of the worst apis in the world

gilded olive
#

SELECT <> FROM <>

earnest phoenix
#

i'd rather slam my tongue in a car door than try to use patreon's api again

gilded olive
#

btw if you want that type of help

#

bruh

hasty mulch
#

Is there another API I can use for a premium command?

tired panther
#

You can use json files to save premiums guild @hasty mulch

earnest phoenix
#

that makes 0 sense

#

why would another api expose sensitive data about some other site

hasty mulch
#

Oof, not familiar with JSON

gilded olive
#

inb4 your JSON file gets corrupted while you are sleeping and everything is gone

tired panther
gilded olive
#

maybe meant maintaenance?

#

oof cant spell

earnest phoenix
#

why can nobody spell maintenance properly

tired panther
#

maybe be not a native english speaker

gilded olive
earnest phoenix
#

i'm not either 🤷‍♂️

#

anyway

quartz kindle
#

congrajlashins

earnest phoenix
#

you can just google the word and you'll get the definition

tired panther
earnest phoenix
#

my mother tongue is croatian

gilded olive
#

oo cool

quartz kindle
#

kako si

tired panther
tired panther
earnest phoenix
#

uwu

pale vessel
#

delete message

tired panther
#

which one?

carmine summit
#

is arr[1]++; gonna work?

quartz kindle
#

if arr[1] is a number yes

carmine summit
#

alright thanks

tired panther
gilded olive
#

bc no docs

earnest phoenix
earnest phoenix
#

the count now shows

tired panther
#

@earnest phoenix how did u have this growth?

#

then your bot idea must be very good

tired panther
earnest phoenix
#

(The count is live :D)

tired panther
#

@earnest phoenix do u make websites for other persons?, your ones looks very good!

#

I love thread designs

tired panther
#

I want one xD

earnest phoenix
#

You can DM me for info but idk if its against rules

quartz kindle
#

jesus

#

what are the other 400mb in node modules?

tired panther
#

lol

#

npm clean

gilded olive
#

inb4 pushing it to github by accident

tired panther
gilded olive
#

you can forget sometimes

earnest phoenix
#

electron-builder and the rest are dev deps (typescript, babel, eslint etc)

quartz kindle
#

gitignore node_modules is like the first thing i do when creating a project

earnest phoenix
#

i just steal visual studio's gitignore

#

perfect template

gilded olive
#

uh you can use an extension if you are using visual studio code

#

auto generates one for you

carmine summit
#

Which do you prefer? Reactions of up/down/left/right or WASD but player has to press enter everytime

quartz kindle
#

reactions

carmine summit
#

mouse clicking intensifies

sick sluice
#

why do I got
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
on message.clear_reactions() just now? (discord-py)

carmine summit
#

ill just do both

earnest phoenix
#

ratelimits angeryBOYE

gilded olive
#

show the full traceback

carmine summit
#

hmm

gilded olive
#

please

earnest phoenix
#

check for permissions for every action before you actually do it

gilded olive
slender wagon
#
if(message.member.roles.highest > member.roles.highest) {
``` would something like this work?
earnest phoenix
#

i was talking to cwickks

gilded olive
#

oh my b

earnest phoenix
#

or whatever it is in djs

slender wagon
#

oh okay

quartz kindle
#

ye, highest gives you a full role

slender wagon
sick sluice
#

and previously it works

quartz kindle
gilded olive
#

show full traceback @sick sluice

slender wagon
sick sluice
# gilded olive show full traceback <@!187562455583424513>
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/adi/Python/radio-id-bot/app/misc.py", line 92, in _stats
    await msg.clear_reactions()
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/site-packages/discord/message.py", line 1096, in clear_reactions
    await self._state.http.clear_reactions(self.channel.id, self.id)
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/site-packages/discord/http.py", line 241, in request
    raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/site-packages/discord/client.py", line 333, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 40, in on_command_error
    raise error
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/site-packages/discord/ext/commands/core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/adi/Python/radio-id-bot/venv/lib/python3.6/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: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
gilded olive
#

there we go

#

can i see the stats command?

sick sluice
# gilded olive can i see the `stats` command?

it's kinda long and complicated, but the core of this function is:

  • split long text into serveral pages
  • then use reaction to navigate each page
    should be something like this:
# bot send msg
msg = await ctx.send("Page 1 of message")
await msg.add_reaction('⏪')
await msg.add_reaction('⏩')

# then i wait for reaction
reaction, _ = await self.bot.wait_for('reaction_add', timeout=5.0)
await msg.clear_reactions() # here i clear the msg reaction <- this line throw 403 error
await msg.edit(content="Page X of message")
await self.page_reaction(msg, total_page, current_page) # then i re-add the reacion
carmine summit
#

How do I make something like m.react(😄, 🙂, ❤️)

earnest phoenix
#

message.react("😄")

#

but with these emojis

sick sluice
carmine summit
#

no I mean

thin crag
#
                 ^

ReferenceError: MessageEmbed is not defined``` anyone coding in js know why this wont work? it worked wayy before when i started making my bot but it just gives me an error now. it may just be a simple fix but im still a little new to coding srry
carmine summit
#

multiple emojis

gilded olive
#

does the bot have permissions? @sick sluice

carmine summit
#

or do I have to do it one by one

#

guess im doing it one by one

sick sluice
earnest phoenix
sick sluice
gilded olive
#

To be honest my bet best is like manage emojis

#

id have to check brb

earnest phoenix
#

@thin crag

gilded olive
carmine summit
#

hmm

#

\🇼 \🇦 \🇸 \🇩

earnest phoenix
gilded olive
#

nvm

#

it's manage_messages

#

had to check the docs

carmine summit
#

why cant i see the

#

unicode

#

:((

#

\🇼 \🇦 \🇸 \🇩

earnest phoenix
carmine summit
gilded olive
earnest phoenix
#

Oh

#

nvm

gilded olive
sick sluice
gilded olive
#

yes

sick sluice
#

hold on

thin crag
carmine summit
#

\⬆️ \⬇️ \⬅️ \➡️

#

There we go

sick sluice
earnest phoenix
sick sluice
#

so the bot need manage_message permission to clear it's own reactions

#

kinda weird

earnest phoenix
#

lol

sick sluice
#

it can edit it's own message without this permission tho

earnest phoenix
#

Yep

gilded olive
#

discord and their permissions

earnest phoenix
#

xD

gilded olive
sick sluice
#

thank you @earnest phoenix @gilded olive

gilded olive
earnest phoenix
#

uoh how to stop everyone from viewing specific channel when creating js

gilded olive
#

you can overwrite the permissions with PermissionOverwrite

#

then pass the overrides kwarg in await guild.create_text_channel

#

ill get you an example wait a sec > @earnest phoenix

#
guild = ctx.guild
overrides = {
                    guild.owner: PermissionOverwrite(send_messages=True),
                    guild.me: PermissionOverwrite(send_messages=True),
                    guild.default_role: PermissionOverwrite(send_messages=False, read_messages=True)
                }
                return await guild.create_text_channel(name="name-here", overwrites=overrides)```
earnest phoenix
gilded olive
#

fuck a me

#

that looks so weird

#

i feel for you

#

lol

#

i should stop assuming people are using python

#

most discord.js blobpain

earnest phoenix
opaque seal
#
const shard = shardsManager.shards.first();

const [uptimeValue, uptimeErr] = await shard.fetchClientValue('uptime');
const uptime = uptimeErr ? null : uptimeValue;

I get: TypeError: (intermediate value) is not iterable

#

Why?

#

On await shard.fetchClientValue

carmine summit
#

how do I remove a specific reaction from a message?

pale vessel
#

Have you tried logging your variables

#

[uptimeValue, uptimeErr] means that it's an array

#

with two first elements being uptimeValue and uptimeErr

opaque seal
#

The error is on the await method

carmine summit
#
client.on("messageReactionAdd", (messageReaction, user) => {
  messageReaction.remove();
})
```apparently removes ALL the reactions on the message
opaque seal
#

It's an array because await returns two values

#

corresponding to .then and .catch

pale vessel
#

Just log it

#

console.log(await shard.fetchClientValue('uptime')) after you define shard

opaque seal
#

I get 676

#

So it's the right value

earnest phoenix
#

#console is gay// rule set+|true

opaque seal
#

But await should always return an array of two values

earnest phoenix
#

I’m a devel

#

Developer

#

do you want a medal

pale vessel
#

Send the console output

opaque seal
#

It gives me the righe value @pale vessel

carmine summit
#

@quartz kindle I need help

earnest phoenix
#

//console output(//gay%#gibberish^

opaque seal
#

But shouldn't await always return 2 values in an array

pale vessel
#

Just curious to see

opaque seal
#

It logs 676

pale vessel
#

That's fetchClientValues()

#

fetchClientValue() is for the shard

opaque seal
#

What's the difference sorry?

pale vessel
#

It won't return an array

#

It's singular

opaque seal
#

So the principle that it returns the .then() value and .catch value is wrong?

earnest phoenix
#

((Gayness/\value**over9000-true:/

opaque seal
#

Dude stop please

pale vessel
#

fetchClientValues() fetches values from each shard, with an array as output for each shard.
fetchClientValue() is for shard where it returns the value for the current client

earnest phoenix
#

Ok

carmine summit
#

I think fetchClientValues() returns a promise

pale vessel
#

Both do, yea

opaque seal
#

So I just need to use try catch

carmine summit
#
client.on("messageReactionAdd", (messageReaction, user) => {
  messageReaction.remove();
})
```apparently removes ALL the reactions on the message. I need it to only remove the reaction that was added
quartz kindle
earnest phoenix
#

can i deny permission for another id

#

cant find a way to do it

quartz kindle
#

deny: ["SEND_MESSAGES"]

earnest phoenix
#

When I left the vc, then my bot also left the vc

#

but everyone can still view it

#

i wanna deny specific role to view channel

slender wagon
#
let rankingA = message.member.roles.highest.position;
      let rankingB = member.roles.highest.position;
      if(rankingA === rankingB){
``` would this be a good way to get through the problem i had earlier?
pale vessel
#

>=

earnest phoenix
pale vessel
#

It would error if it's higher or same position

earnest phoenix
#

history*

slender wagon
#
 if(rankingA > rankingB) {
if(rankingA < rankingB) {

pale vessel
#

Not sure what this is for in the first place but I guess so (use === for the next one)

slender wagon
#

already used that in the first one

#

it is for a ban command

#

checking the role ranking

pale vessel
#

Wouldn't just >= be enough?

#

Also, why not member.bannable?

carmine summit
#

Lower ranks can ban higher ranks if the bot have the highest rank amongst them.

earnest phoenix
#

How do i give my bot a status, its made using dsharpplus (C#)

#

Ive been looking at the documentation but theres nothing of use

lusty quest
#

did someone here has an idea why this returns undefined```js
await Guild.findOne({guildID: guild.id}).exec( (err, doc) => {
if(err) console.log(err);
console.log(doc);
});

timber fractal
#
message.guild.users.cache.get(args[0])``` why if i use this it says that cache is not defined
sudden geyser
#

guild.users is not a thing

timber fractal
#

bruh

sudden geyser
#

you probably meant guild.members

timber fractal
#

first ir worked

#

okay

#

i will try

#
const canva = require('canvacord');
const Discord = require('discord.js')

module.exports = {
    name: "wasted",
    description: "You are wasted",


    async run (client, message, args) {
        const member = message.mentions.users.first() || message.guild.members.cache.get(args[0]) || message.author;

        let avatar = member.displayAvatarURL({dynamic: false, format: "png"});

        let image = await canva.Canvas.wasted(avatar);

        let wasted = new Discord.MessageAttachment(image)
       
        message.channel.send(wasted);
    }
}```if i use this it says `member.displayAvatarURL` is not a function or is not defined
#

@sudden geyser

earnest phoenix
proper bolt
earnest phoenix
proper bolt
#

no

timber fractal
#

-_-

umbral zealot
#

Or cloudflare did.

umbral zealot
#

¯_(ツ)_/¯

sudden geyser
#

If you look into the docs, you'll see a GuildMember doesn't have the displayAvatarURL method: https://discord.js.org/#/docs/main/stable/class/GuildMember

You'll see a User instance does: https://discord.js.org/#/docs/main/stable/class/User?scrollTo=displayAvatarURL

I also don't know why you're trying to juggle two types with your member variable

proper bolt
#

are you not using like intellisense @timber fractal

timber fractal
#

@sudden geyser so what to do

#

\because with the info u gave i cant fix it

proper bolt
#

go to guildmember on the docs

#

scroll down

sudden geyser
#

You should read what I said, because it gives enough insight: a GuildMember (message.guild.members.cache.get(...)) doesn't have a displayAvatarURL method, yet a User (message.mentions.users.first() & message.author) does.

The docs explain everything.

timber fractal
#

but

proper bolt
#

you can use .user on the guildmember to get the User

sudden geyser
#

You can get the User instance by doing .user on a GuildMember

timber fractal
#

how can i do it with a member ID than?

proper bolt
#

what

quartz kindle
#

message.author = User
message.member = Member
message.member.user = User

timber fractal
#

i want it so u can do like h!ban {ID}

proper bolt
#

everything you asked about is in the docs

timber fractal
#

-__