#development

1 messages ยท Page 1337 of 1

earnest phoenix
#

yes

#

that is also true

#

oh my fucking god so give me context what you're doing and working with

#

a web page?

#

yep

#

what are you doing lmao

#

Well I will just found out it myself

#

it seems difficult to understand

#

files don't exist in a browser context (well, they do, but not in a nodejs way)

#

bruh

#

u dont understand it

#

that's why i keep asking you what in the literal fuck are you doing

#

it would be a lot easier if you just said what you were doing in the first place

#

i don't get where's the problem

#

I'll found it myself out

pale vessel
#

then why ask here in the first place

earnest phoenix
#

@weak parrot ads

#

Because I thought people could understand it

#

@main bobcat shut

pale vessel
#

explain then

earnest phoenix
#

Well I did it, the best I could

#

;-;

#

so I'll try it out myself

#

i keep asking you what you're doing, what led you to the fact that you need to use appendfile in a browser context and you refuse to answer lol

jovial nexus
#

How can i put in my bot setActivity the shard it is?

quartz kindle
#

using the sharding manager or internal sharding?

jovial nexus
#

internal

#

const client = new Discord.Client({ shardCount: 16 });

quartz kindle
#

you use setActivity 16 times

swift sentinel
#

Hey, good morning everyone. Does anyone know how to make your bot in .js change icon / avatar, just like Loritta and Neko bot do?? Thanks in advance!

quartz kindle
#

each one with a different shardID

jovial nexus
#

huh?

quartz kindle
#

client.user.setActivity("abc from shard 1",{type:"WATCHING",shardID:1})

rose warren
#

@tame badger https://anidiots.guide I'd recommend looking at this for help setting up your first bot.

opal plank
#

so if i were to 300IQ i could have a status for every guild by having 1 guild in each shard? @quartz kindle

jovial nexus
quartz kindle
#

yes

#

@opal plank kinda

jovial nexus
#

well

opal plank
#

HEHEHEHEHEH and here i thought i was abusing twitch with 400 shards(ish)

jovial nexus
#

i cant have 16782 shards so...

opal plank
#

discord, here i go!

quartz kindle
#

and even if you do have 1 shard per guild, you are not guaranteed to receive 1 guild on each shard

#

you will likely get tons of shards with 0 guilds and others with 2-3 guilds

jovial nexus
#

true

earnest phoenix
#

@earnest phoenix why do u have prosses hacker

opal plank
#

hmmm thats a pain then

#

per-guild status would be nice

#

with membercount, all that jazz

#

spam api with status updates

quartz kindle
#

pls discord ban this dude ^

jovial nexus
#
    client.user.setActivity("no",{type:"WATCHING",shardID:1})
    client.user.setActivity("yes",{type:"WATCHING",shardID:2})
    client.user.setActivity("no",{type:"WATCHING",shardID:3})
    client.user.setActivity("yes",{type:"WATCHING",shardID:4})
#

this 16 times

quartz kindle
#

ye

jovial nexus
#

my eyes burn

rose warren
opal plank
#

wanna see eyes bruning?, bet

#

check this

jovial nexus
#

no please

quartz kindle
#

@jovial nexus if you have repeating statuses, you can use an array of shard ids

#

shardID:[0,2,4,6,8]

opal plank
#
let count = 0;
guilds.forEach((guild) => {
client.setStatus(guild.memberCount, {shard: count});
count++
})```
behold, the ultimate shit code
jovial nexus
#
    at ClientPresence.set (bot title here\node_modules\discord.js\src\structures\ClientPresence.js:27:50)```
opal plank
quartz kindle
#

@jovial nexus console.log(client.ws.shards)

opal plank
#

can we get a dev challenge to see how quick we can get ratelimited?

jovial nexus
#

wdym?

opal plank
#

while(true) {client.setActivity('LuL')}

#

something like this

#

shortest way to get ratelimited with the least amount of characters

quartz kindle
#

@jovial nexus wait

#

you're using shard 1-16?

#

you have to use 0-15

jovial nexus
#

umh yes?

#

im trying with 2 shards

#

for 16000 guilds

earnest phoenix
#

Does someone knows a sick background for my site??

jovial nexus
#

this is going to be funny

quartz kindle
#

you cant have 2 shards for 16k lul, unless you leave 12k offline

jovial nexus
#

you cant have 2 shards for 16k lul, unless you leave 12k offline
@quartz kindle ?????

#

each shard can have up to 5000 guilds no?

quartz kindle
#

2500

jovial nexus
#

shit

#

good knowing

restive furnace
#

@opal plank it's clientUser

#

not client

rose warren
#

I heard around 1,000 was best practice though. That true?

restive furnace
#

clientUser#setActivity

jovial nexus
#

i think the best was 2200 - 2300

earnest phoenix
#

Someone knows a clean website background

quartz kindle
#

im currently using 1600-2000 per shard

rose warren
#

@earnest phoenix try unsplash

quartz kindle
#

from discord's perspective, less guilds per shard is better for them, faster load balancing and faster reconnects

#

form a user's perspective, more guilds per shard is better

rose warren
#

Yeah. On auto shard it does 1k per shard automatically

#

form a user's perspective, more guilds per shard is better
@quartz kindle how so?

quartz kindle
#

unless you have tons of cpu cores

earnest phoenix
#

@rose warren holy damn thanks

#

it gave me a insane background

quartz kindle
#

if you have 10k guilds, and 1 cpu core, its better to have all of them in the same process, and one process with 4-5 shards would be better than 1 process with 10 shards, less connections, less chances of weird shit happening behind the scenes

rose warren
#

Discord needs a "save" / "bookmark" feature to save messages in ๐Ÿ˜‚

jovial nexus
#

Thats a nice idea

rose warren
#

It would be awesome. I'm always reading or seeing stuff around different servers I'd like to save for later.

jovial nexus
#

why user.presence.activity ? user.presence.activity.name doesnt work?

earnest phoenix
#

it's a array

#

oh,wait.

jovial nexus
#

?

restive furnace
#

it's ternary

#

it needs 3 operands to operate with

pale vessel
#

get it

#

ternary

#

three parts

restive furnace
#

cond ? if cond is true, this block executes : if cond is false, this block executes

#

how hard is that to understand smh

jovial nexus
#

user.presence.activity ? user.presence.activity.name : "Nothing"

pale vessel
#

yes

#

user.presence.activity?.name || "Nothing" ๐Ÿ˜ฉ

jovial nexus
#

user.presence.activity ? user.presence.activity?.name : "Nothing" that?

pale vessel
#

nah

jovial nexus
#

but that dont work

pale vessel
#

let me check docs

#

it's activities lmao

#

plural

#

it's an array of activities

#

user.presence.activities[0] ? user.presence.activities[0].name : "Nothing" this gets their first activity

jovial nexus
#

1st?

pale vessel
#

yes

#

there can be more than one

#

since it's an array

jovial nexus
#

wil try it gimme a sec

pale vessel
#

you need to handle those

jovial nexus
#

that worked thanks

reef carbon
pale vessel
#

thonk @slender thistle

slender thistle
#

ba da bee ba da boom

#

did you install django bro

tame badger
#

How can I make a music bot?

reef carbon
#

did you install django bro
@slender thistle yeah

slender thistle
#

How are you running your bot and how did you install Django?

reef carbon
#

It's not my bot but I'm running it on a VPS Ubuntu 18.04

#

and I installed it with pip install django and pip install djangorestframework

sudden geyser
#

is raise ... from ... really valid syntax I see now

reef carbon
#

it's the code that comes with the file so it should be correct syntax

#

and I didn't make any changes to it

slender thistle
#

and how are you running the file?

reef carbon
#

just python manage.py runserver

#

if that's what you mean

slender thistle
#

huh

#

Try python -m pip install -U django

reef carbon
#

ok

#

it says requirement already up to date

charred nimbus
#

is debian better or Ubuntu

faint prism
#

lol

charred nimbus
#

for my bot

faint prism
#

Controversial

#

I recommend Ubuntu for beginners

charred nimbus
#

ok

#

thank u

faint prism
#

Are you going with the server edition or with a desktop?

charred nimbus
#

yes

#

VPS

pale vessel
#

yes

faint prism
#

are you familiar with Linux's terminal?

charred nimbus
#

yes

faint prism
#

Okie-doke. You're all set then

charred nimbus
#

ok

reef carbon
#

@slender thistle do you know why this is happening?

slender thistle
#

Not exactly. Can you show your full code?

reef carbon
#
#!/usr/bin/env python
#"""Django's command-line utility for administrative tasks."""
import os
import sys

def main():
    # """Run administrative tasks."""
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'exo_api.settings')
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == '__main__':
    main()
earnest phoenix
#

I've setted up google search console for my site, but it still doesn't shows up if i google site:MYSITE

slender thistle
#

uhh what the heck

#

are you sure you need that

reef carbon
#

are you talking to me?

slender thistle
#

yeah

reef carbon
#

I'm pretty sure I do

earnest phoenix
#

@earnest phoenix why do u have prosses hacker
@earnest phoenix what the fuck

ionic dawn
#

whats the TEAM_USER flag?

hushed axle
#

How do I check how many server that other people add my bot in?

chilly bison
#

whats the TEAM_USER flag?
@ionic dawn Team-owned bots or stuff

reef carbon
#

client.servers

chilly bison
#

How do I check how many server that other people add my bot in?
@hushed axle js or py?

hushed axle
#

Js

chilly bison
#

@hushed axle eris or discordjs?

reef carbon
#

or jda flushball

hushed axle
#

catwhat what you mean

earnest phoenix
#

Idk

#

what todo

#

wait ur deleting your messages

delicate shore
#

Yes my VPS is shit

earnest phoenix
#

what vps you use

delicate shore
#

Galaxy Gate more like Galaxy Gate

charred nimbus
#

use google cloud

#

i recommend it

earnest phoenix
#

lol

fluid basin
#

dIsCorD iS hOsTEd oN gO0gLe cLOud

#

well facts

earnest phoenix
#

fr?

#

Google clouds is shit

fluid basin
#

yuh

earnest phoenix
#

then

#

discord has so many downtime

#

ngl

delicate shore
#

That's why sometime it acts shit

#

And epic discord is being bad and lagging again

earnest phoenix
#

I dont know but you're kinda weird @delicate shore

delicate shore
#

Messages are going above me which are posted afterwards

earnest phoenix
#

If I say shit, you say i am cursing etc

fluid basin
#

well considering the fact that discord is storing and processing more than 10000x the amount of things you process on your bot

earnest phoenix
#

and you're doing it all the time aswell

#

well considering the fact that discord is storing and processing more than 10000x the amount of things you process on your bot
@fluid basin Facts facts

#

๐Ÿ˜‚

delicate shore
#

If I say shit, you say i am cursing etc
@earnest phoenix
My server family friendly not this

earnest phoenix
#

shit isnt not-family-friendly

buoyant aspen
#

maybe a dumb question, but I'm sick of trying to explain myself to google.

I want this line to check if the message starts with one of multiple prefixes listed in a config object called modulePrefixes.

if (message.content.startsWith(config.prefix)) {
  // ...
}
earnest phoenix
#

my parents normally say shit etc

delicate shore
#

Me too

earnest phoenix
#

And idc they do

delicate shore
#

Nice

earnest phoenix
#

Because i used to do that aswell

#

๐Ÿ˜Ž

#

Lemme work on my site

#

also rip, google has paused the google search console, indexation

#

so it can't be on google till they resume it

#

rip rip rip

delicate shore
#

also rip, google has paused the google search console, indexation
@earnest phoenix
Sad my website was automatically indexed by Google

#

But it didn't index its main page

faint prism
#

You can tell google to ignore it

delicate shore
#

And now

faint prism
#

also robots.txt

delicate shore
#

also robots.txt
@faint prism I hab dat

earnest phoenix
#

you have to index it

delicate shore
#

No

#

Google can automatically index also

earnest phoenix
#

if you cant index it, your site cant be on google

#

no

#

they stopped doing that

#

for a few weeks

delicate shore
#

Google takes about 2 weeks

earnest phoenix
#

it will be back soon probably

#

7 more days

#

ig

delicate shore
#

For indexing it

#

Automatically

#

They'll index it don't worry

#

My pages also got indexed

#

Except main one

#

We can't submit manual indexing request

#

But automatic is still on

earnest phoenix
#

how long does it takes

#

before they do that

delicate shore
#

2 weeks minimum

#

They only index if your website has meta tags AFAIK

earnest phoenix
#

manual will be back soon

delicate shore
#

Yes

#

In few weeks

#

I am waiting for that

earnest phoenix
#

same

delicate shore
#

My main page isn't indexed ๐Ÿ˜‚

earnest phoenix
#

how did u made your site

delicate shore
#

Rest all are

earnest phoenix
#

i saw you're github

#

2k lines for every page nearly

#

How did you do that

#

i can't believe you typed 2k lines

#

per page

#

But finally my site is online, etc

#

I got directadmin acces

modest smelt
earnest phoenix
#

aswell

#

@modest smelt by ID

#

I think

modest smelt
#

how?

#

i tried doing this:

#

<!id>

earnest phoenix
#

no

modest smelt
#

I mean

earnest phoenix
#

boi

modest smelt
#

<@!id>

earnest phoenix
#

do this: \@rolemention

modest smelt
#

I did that too

#

but not work

earnest phoenix
#

then copy what it said

#

it works

#

believe me IT WORKS

modest smelt
#

Bruh ok

earnest phoenix
#

@modest smelt

#

use this

#

and test if the bot pings you

winter topaz
#

no?

#

to mention a role it's <@&ID> isn't it?

#

or am i just stupid lol

restive furnace
#

^^^

solemn latch
#

<@&123456789012345678>

#

Come on discord

#

Yes, its right

tulip ledge
#

Hey so I have this array [1, 2, 3, 4, 5, 6, 7, 8]
Then I have 2 numbers (2 indexes) and I basically wanna split the array depending on these indexes so lets say they are 3 and 7 the array should be: [3, 4, 5, 6, 7]

delicate shore
#

Rest all are

tulip ledge
#

i tried that I might just be stupid tho

delicate shore
#

i can't believe you typed 2k lines
@Nutella#0007
I took a lot of code from online as well which you should too

#

No-one nerd can type 2k lines of code

pale vessel
#

@tulip ledge [0, 1, 2, 3, 4, 5].slice(1, 4 + 1); // [ 1, 2, 3, 4 ]

gilded ice
#

Is there a way to join an array at intervals other than each item e.g [1, 2, 3, 4].someArrayFunction(2, "\n"); โ†’ 1,2, 3,4

sacred cypress
#

Wait what

#

What am I doing wrong

solemn latch
#

why do you want to do that @gilded ice

ionic dawn
crystal socket
sacred cypress
#

fucking

#

fuck docker

#

ready to accept my ass

gilded ice
#

@solemn latch don't wanna have to do ${arr[0]} and ${arr[1]} and ${arr[3]}...\n${arr[4]}...

restive furnace
#

for (const i of Object.keys(object)) { str += `${arr[0]} and ` }

#

learn loops

pale vessel
#

wew it ends with and

ionic dawn
pale vessel
#

@gilded ice make a better structure like js [ ["foo", "bar"], ["baz", "biz"] ].map(x => x.join(" and ")).join("\n"); // "foo and bar\nbaz and biz"

snow urchin
#
TypeError: Cannot use 'in' operator to search for 'title' in 745608071706837110
at Embed.setup (/var/bot/node_modules/discord.js/src/structures/MessageEmbed.js:38:26)
at new MessageEmbed (/var/bot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)
at new Embed (/var/bot/src/Util/Client/Functions/Embed.js:5:5)
at /var/bot/src/Commands/Development/evaluate.js:56:28
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

wut

sudden geyser
#

The error is quite self-explanatory: The in operator can't be used to search for a string in a number.

snow urchin
#

thing is, line 56 is just let errEmbed = new client.Embed(message.guild.id)

small prairie
#

discord.js in client sharding isnt working

#

const client = new Discord.Client(shards:'auto');

sudden geyser
small prairie
#

this is what should work right?

misty sigil
#

No

sudden geyser
#

did you forget the {} around it.

misty sigil
#

it needs to be {shards: 'auto'}

earnest phoenix
#

to mention a role it's <@&ID> isn't it?
@winter topaz ikr but it was to test if he had mentions disabled maybe..

snow urchin
#

Yeah, but the error comes from the MessageEmbed class from the Discord.js library. If you look into it:
@sudden geyser so one of the embed functions?

small prairie
#

oh RIP

#

thanks lo

snow urchin
#

or discord.js itself

sudden geyser
#

No, the constructor client.Embed, which is probably an extended class of Discord.MessageEmbed. Can you show your definition of the class

snow urchin
#

aight

small prairie
#

is there same for CommandClient for discord.js-commando?

snow urchin
small prairie
#

Welp const client = new Discord.Client({shards:'auto'});
didnt work either

misty sigil
#

How do you know

small prairie
#

Nvm im dumb
Instead of client.shard i was checking client.shards category

#

Thanks lol

sudden geyser
#

@snow urchin the first argument of data should be an object. You're giving it the guild ID

snow urchin
#

its worked before, and I have used the guild ID from it before, just fine.

sudden geyser
#

Try it without a guild ID and give data a default value of {} (data = {}) and see what you get.

small prairie
#

nvm sharding isnt working

#

or i might be wrong

#

what should !eval client.shard.count reply with?

#

rn its 0

#

and my client is

#

const client = new Discord.Client({shardCount:5});

snow urchin
#

@sudden geyser fixed :D
Also, would playing an audio stream which is hosted on the same server be faster at all using localhost or direct ip

#

or no difference

sudden geyser
#

I don't know, I don't work with audio.

gilded ice
#

@low orbit wdym

earnest phoenix
#

does Date.UTC work without internet

molten yarrow
#

try <%= theUser.tag %>

snow urchin
#

you cant do it like that

#

one sec

#

this is an example of how you would go about what your trying

<% if(extra) { %>
<% extra = `${extra}&` %>
<% link = `/bots?${extra}page=` %>
<% } else { %>
<% link = "/bots?page=" %>
<% } %>
<% if(page == 1) { %>
<a style="cursor:no-drop;"><arrows class="left"></arrows></a>
<% } else { %>
  <a href="<%= link %><%= parseInt(page)-1 %>"><arrows class="left"></arrows></a>
<%}%>
<% if(page == Math.ceil((extra ? options[extra.split("=")[0]] : botsSize) / 16) || (extra ? !options[extra.split("=")[0]] : null)) { %>
<a style="cursor:no-drop;"><arrows class="right"></arrows></a>
<% } else { %>
  <a href="<%= link %><%= parseInt(page)+1 %>"><arrows class="right"></arrows></a>
<% } %>
</div>
<% } %>
#

close the tag

#

open one for user

#

close that

#

so on

#

have you not just tried user.tag without any tags?

sharp thicket
#

hiya

pale vessel
#

global monkaS

#

whyyy

#

lowercase
Streaming

sharp thicket
#

?

#

i dont know

pale vessel
#

uh

sharp thicket
#

wait

#

and whats wrong with global?

#

why does everyone hate it?

pale vessel
#

what

misty sigil
#

It wonโ€™t have a capital at the start if itโ€™s lowercase will it?

pale vessel
#

"Streaming"

#

S

rough knot
#

I just want the verifyed Discord bot

#

dev

#

:(

pale vessel
#

yep

sharp thicket
#

huh

misty sigil
#

ok youโ€™re literally why it was removed

rough knot
#

Korabi, i know u

sharp thicket
#

yes

#

indeed

#

I'm the one who exposed you of lying...

rough knot
#

Im not Lying dude

sharp thicket
#

oh well..

#

@rough knot Don't start this shit again

#

ok youโ€™re literally why it was removed
@misty sigil yes lol

split hazel
#

what are some ts advantages and disadvantages than straight up using node

#

i cant get a non bias look ๐Ÿ˜”

earnest phoenix
cinder patio
#

You get type safety

chilly seal
#

its not about bots but maybe yes but can someone help me set verify page? like user need react with emoji,mark on emssage to see full server or must select role to access full server do u know what i mean please?:/

#

...

sudden geyser
#

There are a lot of bots that offer that sort of feature (such as selfroles). One would be Carl.

chilly seal
#

i hate carl,

#

i need do same page almsot as you see up on screen.

gilded ice
#

boot

fluid basin
#

what are some ts advantages and disadvantages than straight up using node
@split hazel as compared to...

#

oh ts

#

typing is great to ensure code maintability

#

and OOP also encourages good overall code design

#

typings also make compile-time static type checking possible

#

which eliminates quite a lot of errors that you might get before running

sudden geyser
#

Think of TS as a higher-level form of JS. Personally I'd stick with JS but there's value in TS.

fluid basin
#

also able to down-compile to lower ES versions I suppose, useful in browsers which don't support the latest syntax

#

ts has built-in polyfills for a bunch of things, though everything is done under the hood

#

@split hazel well I guess that sums up the advantages

#

disadvantages is basically extra time and steps required to compile the code before each execution, as well as extra overhead from the code conversion and runtime type checking

#

and requirements might seem daunting for those starting out with emphasis on good code design and structures using types etc

#

also only those popular or highly used libraries have typings which allow type inference and could cause code to be messy when using a library without typings

buoyant aspen
#

how can I call a function based on a variable name? for example:

var functionToRun = "aFunction";
// make the bot run aFunction();
var functionToRun = "bFunction";
// make the bot run bFunction();
modest smelt
#

I had to send messages at a certain time of the day

#

suppose every day I want to send messages at exactly 5:00 PM PDT how would i DO THAT?

buoyant aspen
#

@modest smelt you're gonna want to use cron. Google how to do that.

sudden geyser
#

Cam one way would be to save the name to a key/value and have the value be the function

buoyant aspen
#

interesting

sudden geyser
#

I personally don't recommend it.

buoyant aspen
#

any other ideas?

modest smelt
#

@modest smelt you're gonna want to use cron. Google how to do that.
@buoyant aspen ok

tulip ledge
#

I know there is a way I think it's with map but idk how and I can't find how to do it online.
So I have this array:

[
"item1": "emoji1",
"item2": "emoji2"
];
```js
Now I wanna get the emoji depending on the item and I don't want to if stack does anyone know how to?
So if the item is item1 it should give me emoji1
#

wait nvm I can just use objects

sudden geyser
#

yeah

#

your intention kind of was from the start since you can't use : like that in arrays

tulip ledge
#

yup I sawx it when I typed out the array lol

#

But isn't there a way using map? ๐Ÿค” I wonder now

#

wait its probably

Array.map(item => {
  return object[item];
}
#

Right?

#

u'd need an object with the emoji's tho but it would turn
["item1", "item2"] into ["emoji1", "emoji2"] right?

split hazel
#

@fluid basin ty

#

types sometimes mess me up so i'll probably look into ts for projects, quite a fan of strict structures in some cases

viscid gale
#

ok i have a nodejs question
below is a simple example of an echo server using the net module

const net = require('net');
const server = net.createServer((c) => {
  // 'connection' listener.
  console.log('client connected');
  c.on('end', () => {
    console.log('client disconnected');
  });
  c.write('hello\r\n');
  c.pipe(c);
});
server.on('error', (err) => {
  throw err;
});
server.listen(8124, () => {
  console.log('server bound');
});

how would i send that to a http.createServer object listening on some random port?
basically i want to make a tunnel but JUST for xmlhttprequests so sry if all of this was useless to my question

#

*http requests

earnest phoenix
#

...a proxy?

viscid gale
#

yea.. because i got a program(yes not discord related)

faint prism
#

Any dev topic is welcome

earnest phoenix
#

just use express and then listen for all http methods (PUT, POST, GET, PATCH, DELETE)

viscid gale
#

i mean technically there is a way, along the lines of having the proxy pc take the request and httpRequestToRealListener(JSON.stringify(proxyRecievedReq)) but i sense it would be slow

#

just use express and then listen for all http methods (PUT, POST, GET, PATCH, DELETE)
@earnest phoenix yea, but im wondering how u would send that exact request back to another listener

earnest phoenix
#

copy the headers and the data from the url params and then forward it to the actual url

#

(with something like node-fetch for example)

viscid gale
#

stuff really specific i take too(for example i ensure that u r loading this on localhost:xxx)

#

but.. node-fetch...

#

hmm

earnest phoenix
#

proxying on localhost is like heating up water with a microwave

viscid gale
#

xD

earnest phoenix
#

you can just use warm water from your tap

viscid gale
#

well its practising

#

for having the proxy online

#

i can't depend on ngrok being around forever u see

faint prism
#

microwaving water is spooky. You never know how hot it is until you throw it on someone's face

viscid gale
#

:l

solemn latch
#

true that

viscid gale
#

lmfao

#

it sounds like u microwaved water before xD

faint prism
#

Maybe, maybe not. The fear of scalding water keeps them from snitching talking about it

viscid gale
#

definitely

vernal rivet
#

I mean microwave water is the lazy way to do it

sudden geyser
#

microwaving water is spooky. You never know how hot it is until you throw it on someone's face
@faint prism you could easily turn that into a florida man story. "Florida Man suffers 1st degree burns after roommate splashes microwaved water in face."

viscid gale
#

LOL

#

"florida man"

#

wth is that LMFAO

faint prism
#

@faint prism you could easily turn that into a florida man story. "Florida Man suffers 1st degree burns after roommate splashes microwaved water in face."
@sudden geyser like this? #memes-and-media message

sudden geyser
#

yes

gilded ice
#

๐Ÿฅš

#

๐Ÿฅš ๐Ÿฅš ๐Ÿฅš

fiery canyon
#

anyone here used patreon api/webhooks before?

#

and which option is better

gilded ice
#

Egg

#

ggE

snow urchin
#

no

faint prism
#

@gilded ice Please stop

gilded ice
#

@faint prism no

#

Egg

faint prism
#

anyone here used patreon api/webhooks before?
@fiery canyon No. But it depends on what you're trying to do

gilded ice
#

๐Ÿฅš

snow urchin
faint prism
#

An api would be suited for making calls to Patreon.
A webhook would be reactionary and event based, although I have no experience with webhooks.

#

@faint prism no
@gilded ice why here and not #general-int where that's allowed?

proven lantern
#

how do you setup elasticsearch to match "lol" to "league of legends"?

#

with a fuzzy search

solemn latch
#

fuzzy(lol, you memer)

proven lantern
#

that didnt work

solemn latch
#

no it doesnt

#

idk how to fuzzy, im just being a troll

gilded ice
#

@gilded ice why here and not #general-int where that's allowed?
Am I not allowed to egg in this channel

#

This is discrimination

proven lantern
#

lol

gilded ice
#

Oh shit this is development

#

My bad sorry everyone

slender wagon
earnest phoenix
#

plz

solemn latch
#

using aws @proven lantern ?

proven lantern
#

nope

#

local install of elasticsearch

earnest phoenix
#

plz

#

plz

proven lantern
#

i think i can just transform the data before inserting it. just make a huge map of things like lol -> league of legends

strong tundra
#

what is best data bas for dicord bot sir/mam

proven lantern
#

what is your bot doing?

strong tundra
#

with meilisearch id set a row set to common acronyms and other things and i'd add that to search

#

not sure how you'd do that with elasticsearch tho

opal kite
#

Hey

#

I need help with coding with the app dbd

crude sparrow
#

hello can i get some help with the bot DSL

opal kite
#

If any1 will help me

faint prism
#

No, but sometimes people will answer programming questions here

opal kite
#

Man then I think ima give up on creating a bot honestly

faint prism
#

Not too hard if you know a programming language tbh

opal kite
#

Yea but idk this

faint prism
#

define "this"

opal kite
#

Like I copied that from yt

faint prism
#

lol

#

Yeah, that's not programming

opal kite
#

Ik

#

Idk what it is

faint prism
#

So that's your issue

opal kite
#

Well what app do I use?

faint prism
#

Use a programming language, and use Discord's API or a library

crude sparrow
#

hello can i get some help with the bot DSL

strong tundra
#

no that is programming

crude sparrow
#

oh

strong tundra
#

just with a shit pseudolanguage

faint prism
#

^ this

quartz kindle
#

technically its scripting

#

@crude sparrow what is your issue?

crude sparrow
#

help

#

with the bot DSL

quartz kindle
#

yes, but help with what

#

what is the problem

faint prism
#

Not very descriptive

crude sparrow
#

YA

strong tundra
#

how do i use discord bot maker

quartz kindle
#

what do you need help with

crude sparrow
#

commands

faint prism
#

what piece of logic

quartz kindle
#

DSL doesnt have commands

crude sparrow
#

oh

#

okay thx

proven lantern
#

@strong tundra thanks, elasticseach has the same synonyms feature.

strong tundra
#

yeah np

heady thunder
#

How do I talk through my bots

faint prism
#

Via an eval lol

#

Or, make a UI to enable easy communication on specific guilds and channels, but that feels like it may be against TOS

boreal iron
#

Anyone has a good alternative lib for ajax in njs?
And nope axios is crap as well as xhr.
I need to use get/post mentoding to local files not using http(rotocol)

#

Oh and of course jQuery not as well since it would require a virtual DOM

molten yarrow
#

hey hey
what are the new rate limits on create reactions for discord.js?

quartz kindle
#

@boreal iron node or browser? or electron/nwjs?

boreal iron
#

Nodejs

quartz kindle
#

@molten yarrow reacting to messages its 1 per 0.25 seconds

boreal iron
#

Well could easily use jQuery if browser

#

*based

quartz kindle
#

@boreal iron nodejs doesnt really do ajax, but i assume you mean making an http request, for which there are plenty of libraries, such as node-fetch, got, bent, and even the built in http/https modules

molten yarrow
#

rly?

im reacting 3 times to Bots message and get after one rate limited

boreal iron
#

Alright will take a look at those, they need to support fetching local files

molten yarrow
quartz kindle
#

@boreal iron local files? you mean files from the same machine as the node process is running? you dont use http libraries for that, you use the fs module to access the local file system

boreal iron
#

Huh nah I guess I misread

quartz kindle
#

@molten yarrow are you properly waiting for the previous reaction to complete before adding the next one?

boreal iron
#

I need the to use get/post method to local files like in Ajax but I donโ€™t wanna use xhr

quartz kindle
#

ajax and xhr are browser-only things

#

it would help if you explain what you are trying to do instead

molten yarrow
quartz kindle
#

@molten yarrow welp, discord.js is kinda bad at handling those

indigo flax
#

i get this error when i start my nodejs bot

quartz kindle
#

one thing you can do is add a delay yourself

compact echo
#

i get this error when i start my nodejs bot
@indigo flax what error

indigo flax
#

(node:851) UnhandledPromiseRejectionWarning: #<Response>
(node:851) 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(). (rejection id: 1)
(node:851) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

molten yarrow
#

hm okay thanks Tim gonna try it xD
it was fine until last week...

compact echo
#

Code?

indigo flax
#

was my installation wrong?

boreal iron
#

Yeah those require a DOM
I thought about a way to call local files using get/post method in nodejs

#

Iโ€™m probably unable to explain it correctly while driving lel

quartz kindle
#

i dont understand what you mean with using get/post for local files, you get local files from the file system, and remote files with get/post

boreal iron
#

Can give bare informations unlikely

warm marsh
#

maybe don't text and drive and wait until you're at home?

compact echo
#

@indigo flax I found this online but don't think it relates to your error unless you are using express. https://stackoverflow.com/questions/53940043/unhandledpromiserejectionwarning-this-error-originated-either-by-throwing-insid

boreal iron
#

Gonna repeat what I mean tomorrow once again if Iโ€™m back at home

faint prism
#

Pretty wild

indigo flax
compact echo
#

I don't know sorry ๐Ÿ˜ญ

indigo flax
#

its ok

quartz kindle
#

@molten yarrow actually, discord.js's system is working as intended:
the rate limit event is discord.js telling you that they prevented a real rate limit error from discord by delaying a request.
since the limit is 1 per 250ms instead of 4 per 1s, you send one and it tells the system the next one will cause a rate limit error, so the second reaction causes discord.js to throw that error to prevent causing a real rate limit error, and then they add it to the queue and retry it later

#

#workingasintended

molten yarrow
#

but i cant use them after that

#

tryed with 1 sec wait time between reactions and it working, but kinda slow now xD

quartz kindle
#

additionally, discord.js also adds their own 500ms delay between all requests

#

"just in case"

#

thats why the rate limit error shows 750ms instead of 250ms

#

and thats why reactions are so slow in discord.js

molten yarrow
#

ouh okay

quartz kindle
#

but there is a way to fix that

molten yarrow
#

are rate limits for message edit also changed now?

quartz kindle
#

not afaik

#

they should share the same limit as sending messages

boreal iron
#

Just need to post some json content to a local php file without the need to use a callback function. dc about on success or not

quartz kindle
#

a local php file? is the php file running on a web server?

boreal iron
#

Hmm

quartz kindle
#

if yes, then yes you can use any http library to send a request to localhost:port/file.php

reef carbon
#

I got the webserver and everything set up but it says forbidden You don't have permission to access this resource. when I try going to the page. Does anyone know why this happens?

faint prism
#

Are you using any sort of authentication or does the webserver have permission to whatever your accessing

shy turret
#

i had to use var :(<

#

(for a global variable)

reef carbon
#

Are you using any sort of authentication or does the webserver have permission to whatever your accessing
@faint prism yeah I did sudo chown -R :www-data exo_api

#

to change the group owner of the files

#

so apache should have access to all of the files

blissful coral
#

How do i do a forEach loop for permissions on a channel I create?

quartz kindle
#

sounds like an XY problem

fringe pendant
#

@blissful coral Probably should give the library you're using if you want a more specific answer. But generally most libraries either include a way to get permission overrides for a specific role/member, a list of permission overrides that you can loop through, etc.

digital ibex
#

hi, im trying to get messages which has been bulk deleted

#

any ideas how im supposed to do this directly from dapi?

earnest phoenix
#

How do i do a forEach loop for permissions on a channel I create?
@blissful coral Loop on permissions of a channel you create? What does that mean

#

use then @digital ibex

digital ibex
#

no i know how that works

earnest phoenix
#

Like, you can literally pass in permission resolvables instead of a loop, idk what you're trying to do

digital ibex
#

i just dont get the content of the message

blissful coral
#

I was asking a dumb question lmfao don't mind me

earnest phoenix
#

what

#

You can't retrieve bulk deleted messages

digital ibex
#

one sec

#

this is what im doing, messages.map((e) => e.channel.messages) and it just says collection (0) times however many times i bulk deleted

#

im using eris idk if discord.js handles it differently or something

quartz kindle
#

you can only get their content if they were cached before being deleted

sonic lodge
#

^

quartz kindle
#

also, you cant get them the way you're doing it

digital ibex
#

ik, im sending the messages after my bot turns on

quartz kindle
#

they are copied to the collection, then deleted from the cache

#

so they are all inside messages, but not anymore in channel.messages

digital ibex
#

oh

#

so how would i go about to get the messages?

quartz kindle
#

messages.map(msg => msg.content)

ancient nova
#

how do I get a count of how many voice channels my bot is in?
or other, how many servers bot is playing music in

quaint peak
#

yo

quartz kindle
#

client.voice most likely

ancient nova
#

I tried client.voice.size or cache.size

#

it didn't return anything

quartz kindle
#

client.voice.connections

ancient nova
#

oh

#

that might work

quartz kindle
quaint peak
#

i currently have this code:

x = requests.get("https://gamerdvr.com/gamer/{}".format(gamertag))
i = BeautifulSoup(x.content, "lxml")
links = i.find_all("img", alt="avatar")
await ctx.send(links)```

and it does this:
#

how would i get the value of "data-original"

digital ibex
#

i scrolled up to just messages and it doesnt show anything to do with content, or show it

ancient nova
#

I've tried the client.voice.connections.cache.size it thorws an error

quartz kindle
#

@quaint peak links.get("data-original")

#

@ancient nova there is no cache

ancient nova
#

I've also tried without it

#

returned an empty map

digital ibex
#

oh

quartz kindle
#

if its empty, then there are no active voice connections

ancient nova
#

I see

quaint peak
#

@quaint peak links.get("data-original")
@quartz kindle ```py
x = requests.get("https://gamerdvr.com/gamer/{}".format(gamertag))
i = BeautifulSoup(x.content, "lxml")
links = i.find_all("img", alt="avatar")
data = links.get("data-original")
await ctx.send(data)

ancient nova
#

thanks!

digital ibex
#

i tried message.content and it actually worked, i didnt see it in the messages object so i thought it wasnt there, re read the docs and saw Array<Messages> ๐Ÿคฆโ€โ™‚๏ธ

quartz kindle
#

@quaint peak try it

digital ibex
#

ty tim

quartz kindle
#

yw

quaint peak
#

thanks

stark abyss
#

does anyone know how to make a picture blury on canvas

#

like add blur to an image ?

limpid pulsar
#

site is down

earnest phoenix
#

Can someone here do for me a bot

#

?

stark abyss
#

what

#

you want people to code you a bot?

#

not for free

merry moat
#

?

#

I'd make one for $20

stark abyss
#

id really do one for a nitro boosted

merry moat
#

but it'll be a low quality one aka very bad

stark abyss
#

^

merry moat
#

5 nitro boosts for the best of my ability

stark abyss
#

does anyone know how to make a picture blury on canvas
like add blur to an image ?

merry moat
#

yeah

stark abyss
#

tell me

#

i pay you in currency of my love

merry moat
#

photoshop is my secret

stark abyss
#

does anyone know how to make a picture blury on canvas
like add blur to an image ?

merry moat
#

yeah canvas...you can use a canvas on photoshop

stark abyss
#

what is photoshop

#

im talking about coding here

merry moat
#

yeah photoshop a blur on the background

stark abyss
#

okay how?

merry moat
#

buy photoshop

stark abyss
#

is "photoshop" an npm?

merry moat
#

haha i feel like your 9

stark abyss
#

I feel like you don't understand the fact that I am using a npm called canvas and I am talking about doing it in discord javascript

#

an other method would do, but in js

merry moat
#

I don't code with javascript

#

I code with a treminal app

stark abyss
#

okay cool

merry moat
#

sooo my coding is harder and your coding is as easy as pressing (Ctrl-Shift-C) and changing something on a website

stark abyss
misty sigil
#

no

stark abyss
#

My bad that your coding is harder

#

I am sorry

#

does anyone know how to make a picture blury on canvas
like add blur to an image ?

#

ig they probably don't have a blur cmd

#

anyone know an alternative if not?

rose warren
reef carbon
#

I'm using django and I got an apache webserver and everything set up but it says forbidden You don't have permission to access this resource. when I try going to the page. Does anyone know why this happens?

spare sparrow
ionic dawn
#

dbl api is down?

misty sigil
#

dbl is down

solemn latch
#

Oh no, what will we do

earnest phoenix
#

how can i make a dashboard for my discord bot?

#

Depends on what programming languages you know

#

i mainly know js

waxen tinsel
#

There is no one way, and there is also no easy way like some website or anything. You will have to do research on how to create and host a website, and make sure what is being taught to you will work for your purposes on a VPS or whatever you end up hosting with.

For site to bot communication at least, the one tip i can give you is I personally use webhooks. Site will send a message formatted for my bot to read through a Discord webhook into a channel. Only solution I could come up with. For bot to site, you will probably want endpoints that you have protected with some sort of key, or just do whatever you want that works I guess.

earnest phoenix
#

uhhh ok lmao

opal plank
#

so many ways to connect bot with the website tbh

#

you could host them on the same process

#

you could use ipc

#

you could use localhost/path with a small api

#

theres plenty of methods to connect to the bot without too much of a hassle

waxen tinsel
#

I considered doing local communication, but webhook system means that I dont have to actively check for communications and such, and that all communications are nearly instant.

vernal rivet
#

or, you could just have the dashboard in the bot. shrug you don't have to worry too much about connection.

waxen tinsel
#

@vernal rivet wdym in the bot?

vernal rivet
#

you can just run the website in the bot's program. instead of having it separate

waxen tinsel
#

threading. effort

#

i caught on to that concept too late and didnt feel like backtracking but ur right

unreal token
#

Code : ```shards.on("shardCreate", shard => {
console.log([${new Date().toString().split(" ", 5).join(" ")}] Launched shard #${shard.id});
let embedt5 = new Discord.MessageEmbed()
.setAuthor(Shard Online | Update!, https://cdn.discordapp.com/avatars/163804470763847680/a_bb43ba59ed24339510d344029ac88d95.gif?format=png)
.setColor("YELLOW")
.setDescription(**I am now available in ${shard.id}.**);
bot.channels.cache.get('768218401466220545').send(embedt5);
});

#

Error : (node:13576) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined

#

can someone please help?

dapper dagger
#

Would anyone who has been approved on top.gg be able to play around with my bot to help me make sure nothing is broken and anything along thoes lines?

#

A extra pair of eyes goes a long way.

vernal rivet
#

@dapper dagger I can look at it when I am eating. Just DM me a server that it is in.

wicked narwhal
#

How do you add CSS to your bots page?

compact echo
#

@wicked narwhal ```html
<style>
css stuff in here
</style>

sudden geyser
#

You can use HTML in the description, but keep in mind you can't use JS in it.

faint prism
#

Right, otherwise it basically be XSS

unreal token
#

Error : (node:13576) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined
@unreal token it works when i do x!eval bot.channels.cache.get('768218401466220545').send('z');

indigo flax
#
const { Command } = require("discord.js-commando");
const request = require("request-promise");
module.exports = class changelog extends Command {
  constructor(client) {
    super(client, {
      name: "embed",
      aliases: ["sayembed"],
      group: "miscellaneous",
      memberName: "embed",
      description: "Posts an embed with desired content",
      guildOnly: true,
                  throttling: {
        usages: 2,
        duration: 10
      },
      args: [
        {
          type: "string",
          prompt: "What channel do you want to send this in?",
          key: "channel",
        },
        {
          type: "string",
          prompt: "What do you want the title to be?",
          key: "title"
        },
        {
          type: "string",
          prompt: "What do you want the content to be?",
          key: "content"
        }
      ]
    });
  }
  hasPermission(msgObject) {
        const mainserver = msgObject.client.guilds.get("706999196124840009");
      if (msgObject.member.roles.find(role => role.name === "Admin")) {
        return true;
      } else if (
        msgObject.author == this.client.users.get("675794471065092161")
      ) {
        return true;
      } else if (msgObject.member.roles.find(role => role.name == "Moderator")) {
        return true;
      }
    return "Sorry ๐Ÿ˜ฃ! You must be a Staff Member!";
  }
  async run(msgObject, { channel, title, content }) {
    let embed = new Discord.RichEmbed()
      .setTitle(title)
      .setDescription(content)
      .setColor("RANDOM");

    try {
      msgObject.guild.channels.find("name", channel).send(embed)
    } catch(error){
      msgObject.reply(`Sorry ๐Ÿ˜ฃ! There has been an error while running this command!\n\n\`\`\`js\n${error}\`\`\``)
    }
  }
};
#

is shows an error

#

i was told to add - someCollection.find('property', value);

  • someCollection.find(element => element.property === value)
#
+ someCollection.find(element => element.property === value)```
#

but where

pale vessel
#

is shows an error
@indigo flax thonk

indigo flax
#

?

pale vessel
#

what error

#

?

pale vessel
#

.find(x => x.name === "channel")

indigo flax
#

hm ill try it thx

pale vessel
#

consider upgrading soon

indigo flax
#

this isnt for my bot

#

its my friends

pale vessel
#

wew you don't care about your friend's bot being broken

#

it's ok, i understand

indigo flax
pale vessel
#

lol xd

indigo flax
pale vessel
#

x can be anything, it's like lambda

indigo flax
#

wait ur not supposed to replace the line if im correct

#

u just paste it after the channels

pale vessel
#

ya

indigo flax
#

@pale vessel sorry for the ping

#

but

#

mayFLOW
BOT
Today at 9:19 PM
@NotCINDERS, Sorry ๐Ÿ˜ฃ! There has been an error while running this command!

TypeError: Cannot read property 'send' of null

#

msgObject.guild.channels.find(x => x.name === "channel").send(embed)

#

msgObject.guild.channels.find(x => x.name === "channel").send(embed)

pale vessel
#

is there a channel called "channel"?

indigo flax
#

oh

#

do i tell him to put the name of the channel or the channel id

#

@pale vessel oh

#

its

#

;embed #channel title

#

it goes in the channel he wants it to go in

pale vessel
#

my bad, it was defined as channel

#

change it to x.name === channel

indigo flax
#

its ok, ur the one helping anyways

#

alright so like msgObject.guild.channels.find(x => x.name === channel).send(embed)

#

bruh

pale vessel
#

yaya

indigo flax
#

he said it works but the cooldown doesnt???

#

ill see

#

he said its

#
        usages: 2,
        duration: 10
      },```
pale vessel
#

i have no idea what that is

indigo flax
#

same

#

im asking him

#

it gives no errors

#

@pale vessel thx so much for the help

#

<3

sick fable
#
async def serverinfo(ctx):
    guild = ctx.guild
    create = await ctx.guild.create_invite()
    bans = await ctx.guild.bans()
    embed = discord.Embed(title = f"{ctx.guild.name}" , colour = ctx.author.colour)
    embed.add_field(name = "Server Owner:" , value = f"{ctx.guild.owner}")
    embed.add_field(name = f"Server's Id" , value = f"{ctx.guild.id}")
    embed.add_field(name = "Member Count" , value = f"{ctx.guild.member_count}")
    embed.set_thumbnail(url = guild.icon_url)
    embed.add_field(name = "Server created on" , value = ctx.guild.created_at.strftime("%a, %d %B %Y , %I %M %p UTC"))
    embed.add_field(name = "Banned Members" , value = f"{len(bans)}")
    embed.add_field(name = "Server's Region" , value = ctx.guild.region)
    embed.add_field(name = f"Role count" , value = f"{len(guild.roles)}")
    embed.add_field(name = "Invite link" , value = f"{create}")
    await ctx.send(embed=embed)```
#

My bot is not able to create invite

#

I tried coding it but I failed

viral plover
#

Does it have the permission to create an invite?

hollow sedge
#

@sick fable whats the error?

earnest phoenix
#

welp

#

who want help me create game bot?

#

i kind of new

sick fable
#

@sick fable whats the error?
@hollow sedge wait

#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Guild' object has no attribute 'create_invite'

#

Error^^^

#

@hollow sedge

tribal siren
#

so i started learning this thing where you gotta be a dev to enable this command

#

i tried this

#
      if message.author.id == 675359952679731200:
        message.channel.send('This is Brace!')
      else:
        message.channel.send('This is not Brace!')```
#

it says error

#

could someone help please

hollow sedge
#

@hollow sedge wait
@sick fable change guild to channel

#

it says error
@tribal siren whats the error

haughty bough
#

Hello. Is there any way I can prevent arrays from being this size or larger? [[], [], [], [], [], [], []]

sick fable
#

@sick fable change guild to channel
@hollow sedge what?

hollow sedge
#

@hollow sedge what?
@sick fable ctx.channel.create_invite()

sick fable
#

Kk

tribal siren
#

@tribal siren whats the error
@hollow sedge lemme look

hollow sedge
#

await the message.channel.send

#

await message.channel.send(message)

tribal siren
#

oh

#

i forgot that

#

thank you <3

hollow sedge
#

yw

sick fable
#

@sick fable ctx.channel.create_invite()
@hollow sedge What if I want to make it a permanent invite?

#

Like it should not expire

viral plover
#

Anyone know how to get promises to work with loops in javascript?
I've tried but I just don't understand them. It doesn't seem to make the loop wait for its completion.

hollow sedge
#

@sick fable

earnest phoenix
#

Hey how can we get all installed package list ? js

hollow sedge
#

npm list or npm ls

#

@earnest phoenix

earnest phoenix
#

K let me try

#

@hollow sedge its console command.
Can we do with eval ?

tulip lodge
#

or just look through your node_modules folder

hollow sedge
earnest phoenix
#

K thanks

hollow sedge
#

np

flat mural
#

@rough obsidian

rough obsidian
#

?

tribal siren
#

how to set a color for an embed?

sick fable
#

Discord.js? @tribal siren

tribal siren
sick fable
#

Oh

earnest phoenix
#

isn't it something like: embed = discord.Embed(...color=discord.Color.blue())

sick fable
#

Embed = discord.Embed(title = "Your title here" , description = "description here" , colour = discord.Colour.red())

restive furnace
#

@earnest phoenix that or simply make execute cmd in ur bot

sick fable
#

Embed = discord.Embed(title = "Your title here" , description = "description here" , colour = discord.Colour.red())
@sick fable @tribal siren

tribal siren
#

oh

#

ok thank you

#

and since im here i also wanna ask how to code a footer

#

i forgot literally everything laughing

sick fable
#

Oh

#

embed.set_footer(text = "Text here" , icon_url = author.avatar_url)

#

@tribal siren

tribal siren
#

ok thank you

sick fable
#

@tribal siren Can we still get verified bot Developer badge now?

opal plank
#

This is all under a single string. The newlines are always there and the Name:/Subject:/etcs are always there. The fields might have multiple lines and might contain the words below ^^

Any cheesy and smart way to split that?
thought of some loops with startsWith() and split('\n') with breaks but there has to be some better and more optimal way of processing that

tribal siren
#

@tribal siren Can we still get verified bot Developer badge now?
@sick fable im tryna get all that info i forgot so i am able to be worthy of that badge again laughexpand

sick fable
#

@sick fable im tryna get all that info i forgot so i am able to be worthy of that badge again :laughexpand:
@tribal siren lmfaoo

restive furnace
#

@sick fable no, also try not to spoonfeed

sick fable
#

@sick fable no, also try not to spoonfeed
@restive furnace k

rough knot
#

How do i get the bot developer role?

opal plank
#

get your bot approved here @rough knot

fossil ridge
#

Someone use BDFD?

#

Cuz i want to know how to share a command

#

Because i dont see anyone with a casino full random command

#

(I've use special emote but i can change that for sharing this on the app)

rough knot
#

How aprociatly does it takes before my bot get approved?

rustic nova
tardy hornet
restive furnace
#

1 week prob

earnest phoenix
#

Nobody knows, it's random

#

Discord staff views bots in unknown times

obsidian tartan
#

is there any way to add masked link in the footer of a embed in discord py?

sick fable
#

get your bot approved here @rough knot
@opal plank Hmm, then still can we get verified developer badge or nah?

pale vessel
#

nah

rough knot
#

ye

#

If we get 100 + servers

sick fable
#

[This is the text](and this is the masked link)

#

@pale vessel I need it badly lol

pale vessel
#

you can't on footer

sick fable
#

Bruhh

#

Wha-

#

is there any way to add masked link in the footer of a embed in discord py?
@obsidian tartan Lol nope you can't add it on footer

#

I didn't read your question fully

stoic girder
#

Yeah no markdown on footer.

obsidian tartan
#

sad

hybrid roost
#

Hello, there are ping-reading problem. When I am using command !log(just print Message in console), ping looks cool. ID is right
@chrome perch

But.

When I trying to process it, I've got something like <@&740631545429229688>

I can see, it is role ping.. Why?

#

OMG

#

I am dumb ass

#

I am trying to ping Bot

#

So

#

It is bot's role ping

#

\\\<

#

Sorry

earnest phoenix
carmine summit
#

how do I put the server count on my bot's website

#

I know i can do it using posts requests

#

but i dunno where to start

spiral crag
#

can we make a bot that sends messages from my account instead of a bot acconut

earnest phoenix
#

can we make a bot that sends messages from my account instead of a bot acconut
@spiral crag that's a self bot and self bots are against TOS

heady forge
#

Why?

abstract coyote
#

Beacouse the Discord API is meant for discord bots ;-;

heady forge
#

Yeah ik, but why did they ban self bots?

pale vessel
abstract coyote
#

Since you can abuse the api in your favooooooooors

heady forge
#

Abuse how? ๐Ÿค”

abstract coyote
#

Like a spam reactions function, or bulk delete

surreal sage
#

I need ideas for a utility bot

heady forge
#

Oh but aren't there already bots which have that function? Like !clear 100 or something

abstract coyote
#

yeah

#

but doing it via self bot would not be very pleasant

#

oh and most certainly to gain more exp levels via something like MEE6 :p

heady forge
#

Hmm, i don't know that much about discord's api, but i suppose regular users have more permissions compared to a bot as well

abstract coyote
#

yeah

#

yyou can do big damage with a self bot

heady forge
#

Oh, haha yeah there's the levelling abuse as well :p

abstract coyote
#

yos

earnest phoenix
#

yyou can do big damage with a self bot
@abstract coyote my server was raided by self bots as they don't need someone with manage server perm to add them

abstract coyote
#

yep

heady forge
#

Dangg

tulip ledge
#

I thought self bots weren't allowed?

heady forge
#

You just need an invite link yeah

#

Yeah I was just asking why they were banned

hybrid roost
#

Hey. I need to crate channel and set premissions overwrites.

var overwrites = new ds.Collection;
        var memberPremissions = new ds.Permissions;
        var memberOverwrites = new ds.PermissionOverwrites;
        var everyoneOverwrites = new ds.PermissionOverwrites;

        memberPremissions.add("READ_MESSAGE_HISTORY");
        memberPremissions.add("VIEW_CHANNEL");
        memberPremissions.add("SEND_MESSAGES");

        memberOverwrites.allow = memberPremissions;
        everyoneOverwrites.deny = memberPremissions;

        overwrites.set(msg.guild.roles.everyone.id , everyoneOverwrites);
        overwrites.set(clanData.memberRole.id      , memberOverwrites);

        console.log(overwrites);

        msg.guild.channels.create(clanData.name, {type:'category', reason:'new guild', permissionOverwrites:overwrites});

sooo, there are error:

permission_overwrites[0].id: This field is required
permission_overwrites[1].id: This field is required
    at RequestHandler.execute (D:\Projects\Maid\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:11828) 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: 1)
(node:11828) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
#

And I really don't know what I have to do

dense spruce
#

hi, on my bot i wanted that we can see the warn of someone on every server but i wanted that it's possible to retire the warn only on the server where the warn was given. but the line to compare the guild's id of the message and the id of the guild in my db.json don't work ... can someone help ? it's the script and it's the 20th line that bug


const moment = require('moment')
    Discord = require('discord.js')

moment.locale('fr')

module.exports = {
    run: async (message, args, client) => {
        if (!message.member.hasPermission('MANAGE_MESSAGES')) return message.channel.send('Vous n\'avez pas la puissance de unwarn un membre (trop faible)')
        const member = message.mentions.members.first()
        if (!member) return message.channel.send('Impossible de unwarn du vide (trop bรชte)')
        if (!client.db.warns[member.id]) return message.channel.send(new Discord.MessageEmbed()
        .setDescription(`**${member.user.tag}** est clean (bien jouรฉ champion)`)
        .setColor('#0082ff'))
        const warnIndex = parseInt(args[1], 10) - 1
        if (warnIndex < 0 || !client.db.warns[member.id][warnIndex]) return message.channel.send('Ce warn n\'est pas dans ma banque de donnรฉes (oups)')
        if (message.guild.id !== `${client.db.guildid}`) return message.channel.send(`Ce warn n\'a pas รฉtรฉ donnรฉ sur ce serveur (triche pas)`)
        const { reason } = client.db.warns[member.id].splice(warnIndex, 1)[0]
        if (!client.db.warns[member.id].length) delete client.db.warns[member.id]
        fs.writeFileSync('./db.json', JSON.stringify(client.db))
        message.channel.send(new Discord.MessageEmbed()
        .setDescription(`**${member.user.tag}** a รฉtรฉ unwarn. Raison : ${reason}`)
        .setColor('#0082ff'))
    },
    name: 'unwarn',
    guildOnly: true
}```
#

it's in javascript*

#

sorry for my english btw ... im french x)

hybrid roost
#

Premissions overwrites objects looks like

Collection(2) [Map] {
  '688755946624647238' => PermissionOverwrites { deny: Permissions { bitfield: 68608 } },
  '768409949507551242' => PermissionOverwrites { allow: Permissions { bitfield: 68608 } }
}
earnest phoenix
#

@dense spruce please stop using a JSON database

#

hi, i got an error pls help

#
const commandFiles = fs.readdirsync('./commands/').filter(file => file.endsWith('.js'));
                        ^

TypeError: fs.readdirsync is not a function
    at Object.<anonymous> (C:\Users\Adwait Misra\Desktop\YesBot\main.js:9:25)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)

    at internal/main/run_main_module.js:17:47```
abstract coyote
#

Use Mongo B)

dense spruce
#

why ? @earnest phoenix

earnest phoenix
#

@earnest phoenix Sync is capital

abstract coyote
#

can't .json databases corrupt easily?

earnest phoenix
#

why ? @earnest phoenix
@dense spruce read pins

abstract coyote
#

YAY :D

#

i have been bumped by the code!

earnest phoenix
#

nevermind it ain't in pins

abstract coyote
#

its funny cause the only time i used a database was for a failed xp system attempt XD

earnest phoenix
#

lmao

#

json databases can and will corrupt

abstract coyote
#

yessss

#

Don't learn the hard way!

dense spruce
#

yeah but as my bot isn't on many server it's not a problem ?

abstract coyote
#

that should be the moto of Mongo

hybrid roost
#

yeah but as my bot isn't on many server it's not a problem ?
@dense spruce cool, but what are you going to do when it will be in many servers?

abstract coyote
#

Draquo its better to do it now than face the depression of corruption later

dense spruce
#

yeah ... ๐Ÿ˜”

earnest phoenix
#
C:\Users\Adwait Misra\Desktop\YesBot\commands\ping.js:5
        message.channel.send(`Pong ๏ฟฝ๐Ÿ“ Latency is ${Date.now() - message.createdTimestamp}ms. AP
Latency is ${Math.round(client.ws.ping)}ms`);

                        ^

ReferenceError: client is not defined
    at Object.execute (C:\Users\Adwait Misra\Desktop\YesBot\commands\ping.js:5:122)
    at Client.<anonymous> (C:\Users\Adwait Misra\Desktop\YesBot\main.js:29:36)
    at Client.emit (events.js:314:20)
    at MessageCreateAction.handle (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)       
    at WebSocketShard.onMessage (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)      
    at WebSocket.onMessage (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:314:20)```
dense spruce
#

how do i change the database then ?

earnest phoenix
#

error

#

why

abstract coyote
#

first make a mongodb account

dense spruce
#

?

earnest phoenix
#

no

abstract coyote
#

or MySQL but Mongo hotter

earnest phoenix
#

mongo is not good for beginners

#

use smth like quick.db rn

hybrid roost
#

I am using JSON now for the test. But I am want to start using MySql tomorrow (I am using VPS and MongDB setup is too hard)

earnest phoenix
#

it is super easy to use

dense spruce
#

i have a adkynet account

#

does it help ?

earnest phoenix
#

hi need help

#
C:\Users\Adwait Misra\Desktop\YesBot\commands\ping.js:5
        message.channel.send(`Pong ๏ฟฝ๐Ÿ“ Latency is ${Date.now() - message.createdTimestamp}ms. AP
Latency is ${Math.round(client.ws.ping)}ms`);

                        ^

ReferenceError: client is not defined
    at Object.execute (C:\Users\Adwait Misra\Desktop\YesBot\commands\ping.js:5:122)
    at Client.<anonymous> (C:\Users\Adwait Misra\Desktop\YesBot\main.js:29:36)
    at Client.emit (events.js:314:20)
    at MessageCreateAction.handle (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)       
    at WebSocketShard.onMessage (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)      
    at WebSocket.onMessage (C:\Users\Adwait Misra\Desktop\YesBot\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:314:20)```
#

also only the first part of the error is enough

#

the other part is just the file path explaining where it occurred

carmine summit
#

discord should add a captcha to gifts...

dense spruce
#

anyway can someone help for my json ? x)

#

pls

earnest phoenix
#

@earnest phoenix client is not defined

#

did you name it bot or smth