#development

1 messages · Page 505 of 1

earnest phoenix
#

@inland pulsar

#

its need Website URL

inland pulsar
#

ok

earnest phoenix
#

and i don't have Website

inland pulsar
#

You can leave it blank

earnest phoenix
#

oh

#

😂

inland pulsar
#

:p

earnest phoenix
#

I'm trying to access tid = <Record id=5523>

with id = [t['id'] for t in tid]
but i get

TypeError: int object is not subscriptable```
#

what am i doing wrong

#

@inland pulsar its want | Please enter at least 300 characters excluding special characters in your detailed description. Add your commands. Spaces or empty spaces are not counted. |

#

😦

#

300 its very big

sick cloud
#

then put more effort into your desc

#

300 characters is tiny

earnest phoenix
#

. ؟

inland pulsar
#

^

wicked summit
#

Somebody know how to make badges like tatsumaki thing?

lament meteor
#

a db

young cradle
#

The image processing side of it or the storage/handling side?

rigid kite
#

Is there a bot that can send a set image from imgur or something with a command?

quartz kindle
#

any bot that has custom commands, like dyno, can be set to send a link

rigid kite
#

Ohh cool thank you

#

How would i create that command for Dyno 😅

heady zinc
#

you should refer to their help command and support for that

hollow fulcrum
#

@sick cloud My code is python if message.author == client.user: return if message.author.bot: return

#

decent enough?

sick cloud
#

i guess

hollow fulcrum
#

mk

tawny lava
#

just ignore bots why are you ignoring client.user as well

#

client.user is a bot

earnest phoenix
#

^

pastel gull
#

-bots

gilded plankBOT
#
WindTR | Selim#9641
Bots

@quasi basin

sick cloud
#

unless selfbot @tawny lava mmLol

tawny lava
#

smh

hollow fulcrum
#

@tawny lava Client.user is ignored by default

#

if you see the above code

#

-bot

#

-bots

gilded plankBOT
#
Ultrasonic54321#7662
Bots

@visual minnow

earnest phoenix
#

Yaaa

lost scarab
#

how do i get random like imgine random turtle pictures?

#

imagine*

sick cloud
#

use an api

lost scarab
#

ty

wheat marten
#

Is glitch free?

uncut delta
#

No u

loud helm
#

Does somebody know how i can play some webradio over my bot?

inland pulsar
#

just play the stream

hushed berry
#

Christ, one of my users managed to get a track with the position of 0.9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998508331853759958651341806936907413232524705693079918621145696333358744322985976339012765021919914439327697679348832779709317454380954939467902767034081583061703747841536243724500959185146712947411710689126987217046917156547882298575993662635399355451540487260146929956932558788332696674270799277414513289630606268534700198369336021642084233462810516357421875

quartz kindle
#

how is that even a valid/safe float

waxen quest
#

So earlier this morning I was trying to make my bot ban a user with a reason, but the reason would not actually appear in the ban tab, anyone knows how I may fix this?

sick cloud
#

use an object

#

and add reason

smoky spire
#

It doesn't have to be an object

sick cloud
#

{ reason: whatever }

#

you have to

waxen quest
smoky spire
sick cloud
#

@waxen quest yes

waxen quest
#

For some reason that isn't working

sick cloud
#
  • does your bot have perms
  • is the hierarchy correct
  • have you tried GuildMember#bannable
waxen quest
#

Everything except the reason is working

wheat marten
#

When I am hosting my discord bot on glitch what type of project do I make?

waxen quest
#

express

wheat marten
#

ok

#

Also how do I make a config.js file in my bot code, I am confused on how I do it

waxen quest
sick cloud
waxen quest
pale marsh
#

@earnest phoenix can you please take care of this? ❤

#

Oh Oliy did

earnest phoenix
#

What's with the quotes in a URL

#

https://www.google.com/?q=learn+js

#

that's the way to go

wise sable
#

wat timezone is the voting based on?

glacial sentinel
earnest phoenix
#

lol

#

Sometimes I like to use LMGTFY on people

fossil sonnet
#

oi

#

someone help

west raptor
#

Discord can't "mute" people

#

You have to make a role then add the role to the user

glacial sentinel
#

Lol

#

I'm wondering where you heard that was a thing

smoky spire
#

For text muting, Dream is right, but for voice muting, it's setMute()

wide ruin
#

How can I check what the next user message is? (Discord.js)

#

So they use a command like o/help, and it says please type a section

#

And for 10 secs, it checks if the message is a valid option, then stops checking

topaz fjord
#

so a message collector

wide ruin
#

Where can I learn how to make one?

topaz fjord
wide ruin
#

Thanks

smoky spire
earnest phoenix
#

What is the Discord token format?

#

I'm trying to auto detect tokens

#

ok

#

What's the point of auto detecting tokens anyway?

#

Because I would like to know if someone leaked their token

#

So my bot can delete it

#

Alphanumeric with 59 characters

#

I wonder how I would detect that in Python (I'm a noob at regex, never actually used it)

#

Thanks

#

@earnest phoenix

#

please eliminate

honest ocean
#

How host our bot ?

#

Thanks !

earnest phoenix
#

Dedicated server !== VPS

ruby dust
#

They are still different

#

Idk by how much, but a vps costs only a few bucks, and a dedicated server at least $100, depending on how roughly you are using it

earnest phoenix
lean anchor
#

Hello, good evening, excuse me You could tell me the command so that my Bot says "Seeing" (and whatever else you put)

earnest phoenix
#

What do you mean by "Seeing"?

#

Something like @earnest phoenix where it says how many guilds the bot is in?

bright spear
#

@lean anchor always say what lib whenever you ask a question, also you mean Watching?

earnest phoenix
#

How do I make a good bot

bright spear
#

@earnest phoenix you code one

earnest phoenix
#

How

topaz fjord
#
  1. Learn a coding language
  2. Find a lib that is in your desired language
  3. Code with it
  4. ????
  5. Profit
earnest phoenix
#

?????

#
  1. I don’t have a PC
  2. I have a school Chromebook that doesn’t do anything
  3. I only have this phone
  4. That’s about it
  5. Oops forgot to expand this
  6. Bye
lean anchor
earnest phoenix
#

How is it a special not

#

bot*

#

And WHAT THE HEK IS VIENDO

#

You have a different language on

#

Yes

topaz fjord
#

well

earnest phoenix
#

It's special because it's a moderator bot specifically designed for this server by the administrators

lean anchor
#

I have seen this also on other servers

earnest phoenix
topaz fjord
#

why ask the question then

#

I will get my dad to hunt you

earnest phoenix
#

@gilded plank: WHY THE HECK U PING!!! STUPIDITY EXISTS AAAAAAAAAAAAA

#

hmmmm............

topaz fjord
earnest phoenix
#

^

#

v

#

This is a dumb comment ^

topaz fjord
fervent oyster
#

does anyone else use lavalink for eris?

bright spear
#

@earnest phoenix stop sending spammy messages

fervent oyster
#

i cant get it to hook to its express server

topaz fjord
#

wwut

fervent oyster
earnest phoenix
#

+serverinfo

fervent oyster
earnest phoenix
#

should my prefixes be per guild or per user

#

guild oof

#

Per user? What?

sick cloud
#

marv had per guild and per user

#

and the old bo bot had user prefixes

knotty steeple
#

@earnest phoenix prefix for a user

#

personal prefixes mmLol

earnest phoenix
#

Yes I know

sick cloud
#

they use up lots of db space

#

but theyre fun

earnest phoenix
#

I don't understand why you would want to do this

#

Literally a database call on every single message for every user

#

haha yes

#

And if you go the caching route, that's a lot of memory your using

inner jewel
#

if you do per guild prefixes you still have the same db call for every message

earnest phoenix
#

Well I cache my settings

#

On the ready event

sick cloud
#

so cache user prefixes?

earnest phoenix
#

That's thousands of users

inner jewel
#

most users don't even change configs

earnest phoenix
#

Ouch

#

oof

#

Guilds are enough already. Lol

sick cloud
#

just use mention then

#

most unique prefix

copper veldt
#

give me a bot that can spam everyone@

inner jewel
#

also you can just use a fixed size cache

#

with LFU/LRU expiration

earnest phoenix
#

@copper veldt Why do you want a spam bot?

copper veldt
#

i want to have 1 million pings

earnest phoenix
#

I mean yes, I could easily make one in 2 seconds but I will not

sick cloud
#

do you wanna get banned

inner jewel
#

load from cache -> if missing load from db and cache -> if needed evict an entry

copper veldt
#

why ban

inner jewel
#

because that's against the discord ToS

earnest phoenix
#

@copper veldt that is a quick way to get discord banned

sick cloud
#

this emoji

copper veldt
#

no like on my own server with no people

earnest phoenix
#

yes

sick cloud
#

still not allowed

earnest phoenix
#

you'll still get banned

sick cloud
#

tos doesnt change based on what server you break it on

inner jewel
#

at best you'll get only an API ban

#

at worst your account is gone

copper veldt
#

whats api ban

earnest phoenix
#

not being able to do anything with the api

inner jewel
#

the ip the bot is in cannot access discord at all

copper veldt
#

whats api

earnest phoenix
#

the discord api

#

the basis of discord

sick cloud
#

@inner jewel i think its account based right

#

so all your bots won't connect

inner jewel
#

i've only seen ip bans so far

earnest phoenix
#

He could have a dynamic IP address though and then get a new one from his ISP

wheat marten
#

Should I stop making my bot in commando?

bright spear
#

ur opinion

fading forge
#

I haven't tried commando, but I don't see much point to it

earnest phoenix
#

d.js best

#

@loud salmon I'm trying to make the ugliest bot page possible and I'm having some difficulty importing in some ugly AF fonts. Are you guys blocking this somehow and do I have to wait until my bot gets approved for the ugly CSS fonts to show up? Thanks!

loud salmon
#

uhhh

#

i havent had success importing fonts

#

i would just use web safe fonts

#

those work

earnest phoenix
#

like........

loud salmon
#

also im not the one in charge of that

earnest phoenix
#

i have had success

loud salmon
#

lmao

earnest phoenix
#

how

#

google fonts

#
  1. i can read
#
  1. i can read
loud salmon
#

(though oliy i can manage it i have a resume 4 u)

earnest phoenix
#
  1. i know html and css
loud salmon
earnest phoenix
#

it doesnt

#

it looks bad

loud salmon
#

1st google result

earnest phoenix
#

Thank you vilP1l

loud salmon
#

🤦

earnest phoenix
loud salmon
#

good news

earnest phoenix
loud salmon
#

comic sans is web safe

earnest phoenix
loud salmon
#

why did you give him the answer 😭

#

it was literally 1 google search away

earnest phoenix
#

I already had that in my code

#

Ok

#

And it wasn't working

loud salmon
#

ohhh

earnest phoenix
#

That's why I asked you guys

loud salmon
#

my b

earnest phoenix
#

it should work

loud salmon
#

maybe you cant change it until its accepted

earnest phoenix
#

ok

#

yeah thats not right

loud salmon
#

wait you didnt change it

#

i dont think @import works

#

this is what i used when i was fucking with my bot page

earnest phoenix
#

i can confirm it works

#

i used it

loud salmon
#

oh im just a brainlet then

earnest phoenix
#

yes

loud salmon
earnest phoenix
#

Show me your bot page

#

i used it on mine

#

show
me
the
bot
page

#

oh my gosh

#

the font works for you

#

I'll just wait until it gets accepted

#

what??

#

im not accepted to anything

#

*it

#

??

#

I'll just wait until my bot get accepted

#

it shouldn't matter

#

oh @earnest phoenix i think i know why

#

try font-family: 'Mali', cursive !important;

#

ok

#

I did that already

#

lol

#

the !important?

#

yes

#

hm

#

Under body

#

you need to add , cursive

#

font-family: 'Mali', cursive !important;

#

ok

#

lets try

#

Nope

#

didn't work

#

hm

#

¯_(ツ)_/¯

silver shadow
#

I just invited him. So how do I start it up

#

_(••)_/
( )
__

earnest phoenix
#

?

#

@heady gull are you talking about your bot?

#

he left

amber junco
uncut delta
#

Take a look at line 30

smoky spire
#

One of your commands doesn't have props.help

uncut delta
#

Make sure your command after meme has a name

#

exports.help

#

name

amber junco
#

all of them have module.exports.help

#

I dont see a problem....

uncut delta
#

Huh

amber junco
#

All of my commands have exports.help

uncut delta
#

Take a look at line 30

amber junco
#

I dont hv line 30

uncut delta
#

Your all commands and events are loaded

amber junco
#

oh

#

ok

#

yes

uncut delta
#

There might be problems with code

amber junco
#

oh

glad rose
#

@pastel gull

vocal meteor
#

Hey what does sharding do

coral trellis
#

Sharding is when you basically run your bot on separate instances so it can handle your bots traffic you need to shard when you reach 2500 guilds

vocal meteor
#

ok

pale marsh
#

Is there a node library that somehow minifies files before sending them to the users? Thonk

pale marsh
#

No idea if it's any good

crude jolt
#

is php bad for a discord bot? I've only seen it used a few times and everyone says php is too bad for a bot

#

but like, I think it's gotten faster

heady anvil
#

PHP is a web backend language...

#

It's not about speed but it was made for the web

crude jolt
#

yes what is the point

#

so is node js

heady anvil
#

I don't use node.js ¯_(ツ)_/¯

crude jolt
#

i think speed matters a little, right? for the sake of performance on your bot

heady anvil
#

not something you should really be that concerned about (but you should definitely keep it in mind) until your bot grows large

#

eg, i keep a few threads to run multiple commands asynchronously because they can make calls to the database

crude jolt
#

ok

knotty steeple
#

@crude jolt not really

#

php isnt designed for things beside backend

#

yes there is js but mmLol

crude jolt
#

isnt a discord bot a back end application technically

knotty steeple
earnest phoenix
#

Well, PHP is not an option for bot really

crude jolt
#

but its not front end either

knotty steeple
#

but it can be used

earnest phoenix
#

Yes unless you run it in the client, Juice box

#

I know with JS, you can use a module bundler to run discord.js in the client side

lost scarab
#

anyone knows how do i know what servers my bot is in?

topaz fjord
#

@earnest phoenix php is an option

earnest phoenix
#

Well, OK, an option, I don't mind

topaz fjord
#

the php lib is listed on discord docs not dbl

earnest phoenix
#

So what?

knotty steeple
#

how to map a map in js

#

using Array.from then mapping that seems shit

heady zinc
#

you need to make your own map method for this

earnest phoenix
#

What

#

Map has a map method

heady zinc
#

it doesn't tho

earnest phoenix
#

It doesn't?
Then I'm used to djs collections that extend map

heady zinc
#

yeah

#

it's the very reason collections are even a thing

#

because maps lack this

earnest phoenix
#

Then you will have to array.from() and map that

slender aspen
knotty steeple
#

fucking hell

earnest phoenix
#

You already declared the variable somehwere..

heady zinc
#

@knotty steeple js for (const [key, value] of map) { if (value !== 'baguette') { map.set(key, 'baguette') } }

knotty steeple
#

xd

#

baguette

heady zinc
#

don't need to say it's faster than doing array.from and stuff

slender aspen
#

?

earnest phoenix
#

@slender aspen read the error, it tells you what's wrong

slender aspen
#

Its saying I have declered Args somewhere else

earnest phoenix
#

You declared that variable somewhere above in your code

#

Yes

#

So you need to look and see where else you defined it

slender aspen
#

Im guessing it's here

#

module.exports.run = async (bot, message, prefix, args) => {

#

Now a New error:

#

module.exports.help = {
^^^^^^

#
^^^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:657:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
[nodemon] app crashed - waiting for file changes before starting...

earnest phoenix
#

Looks like syntax error to me

slender aspen
#

module.exports.help = {
name: "eval"
}

earnest phoenix
#

Highly suggest getting some sort of linter to fix those

slender aspen
#

Linter?

earnest phoenix
#

i mean

#

hes got extra } in there

slender aspen
#

What Line?

earnest phoenix
#

most scuffed indentation

slender aspen
earnest phoenix
#

and code style

brazen parcel
#

Huh

earnest phoenix
#

in the history

#

of man

knotty steeple
#

this is why you have to know how to debug your own code

brazen parcel
#

Hastebin is back online

slender aspen
#

Ik Im learning

earnest phoenix
#

u know u can just count

brazen parcel
#

Or use an ide

earnest phoenix
#

how many opening bracker

#

and how many lcosing

slender aspen
#

ok

earnest phoenix
#

00f

#

just indent everything properly

brazen parcel
#

Use an ide

earnest phoenix
#

yes download a massive ide to indent for you

brazen parcel
#

U could use Atom

earnest phoenix
#

slender aspen
#

Fixed and @brazen parcel I have atom

brazen parcel
#

And there are some ide packages that don’t take up much space

earnest phoenix
#

use tabs btw

#

dont mix space and tab

#

software and websites mess with how many spaces is visually the same width as a tab

#

so just use tabs

brazen parcel
#

That’s a hastebin error

earnest phoenix
#

its faster to move with keyboard in code and easier to stay consistent

#

no its not an error its just a difference

#

for ex. in nano is configurable

brazen parcel
#

Ah

#

I typically ran into problems with that

earnest phoenix
#

notepad++ reindent and auto replace space with tabs 🙏

brazen parcel
#

Wait really?

earnest phoenix
#

textfx plugin

brazen parcel
#

I’ve never used notepad++ due to its interface

#

That was most likely me being lazy tho

earnest phoenix
#

endless options for random shit

brazen parcel
#

🤔

#

Huh

earnest phoenix
#

and takes like 1s to open awesmart

brazen parcel
#

Depends on spec of pc

#

Although

#

Mine is pretty good so I might consider getting np++

nimble coyote
#

For collaborative projects, is there a way to share a .vimrc configuration without changing my normal .vimrc?

#

Or do I need to comment vim rules in each file?

earnest phoenix
#

i think there is a local and global one

#

so you could have 2 accounts 🤷

#

or a script to swap them

topaz fjord
#

n++ for a good pc

#

Nice meme

earnest phoenix
#

vscode benchmark Pog

topaz fjord
#

I would recommend vscode/webstorm

earnest phoenix
#

vscode >>

topaz fjord
#

yet idfk how to configure node for webstorm

knotty steeple
#
Map.prototype.map = function(fn, thisArg) {
  if (thisArg) fn = fn.bind(thisArg);
  const arr = new Array(this.size);
  let i = 0;
  for (const [key, val] of this) arr[i++] = fn(val, key, this);
  return arr;
}
``` ![GWvertiPeepoCheer](https://cdn.discordapp.com/emojis/405951688885665792.webp?size=128 "GWvertiPeepoCheer")
#

wew this works

topaz fjord
#

intellij ides are amazing since you can use one for all langs

earnest phoenix
#

??

#

what is notepad++

topaz fjord
#

lmao

earnest phoenix
#

user defined language KreyGasm

#

lmao

#

for the hyper autistic

native folio
#

notepad ++ is a editor

topaz fjord
#

yes

native folio
#

text editor

topaz fjord
#

Yes

earnest phoenix
#

did ur school teacher tell u that

native folio
#

no

topaz fjord
#

lmao

native folio
#

I have it installed

#

I use vsc now tho

earnest phoenix
#

vscode is a text editor

knotty steeple
#

why doesnt a map have a map method

topaz fjord
#

@earnest phoenix tonkku won't let me create the bot :(

knotty steeple
#

like

#

pls

earnest phoenix
knotty steeple
#

can you make prefixes "space sensitive" in eris

#

what i mean it

#

you can literally do ! ping and it would still respond

earnest phoenix
#

in the command client or whatever? probably not

#

but nobody intentionally does that

#

and is good for mobile users

#

and mention prefix

#

my bot does that

#

it .trim() everything after prefix

knotty steeple
#

but it very annoy

#

and yes in the command client

earnest phoenix
#

ask in lib on api server

#

or dig into source amonkaS

earnest phoenix
#
async def on_ready():
    invitelinknew = await client.create_invite(destination = channel, xkcd = True, max_uses = 100)
    print(invitelinknew)```
this raises a exception channel is not defined
i want that after the bot is ready it prints the server name id and invite link
i have done server and serverid but couldnt do the link
quartz kindle
#

why do you want to create a new invite link every time the bot starts up?

earnest phoenix
#

to join that server and ban all GWfroggyMonkaMega

#

jk

quartz kindle
#

anyway, it would be better to get existing invite links, so you're not constantly creating new ones

glacial sentinel
#

How would I find the amount of users that used a command in the last 10 minutes in all of the shards together? ("Active users")
I use a MySQL database if that can help.
@ me please

#

I figured it out kinda of but it was unoptimized and not sure if it was even right lol

quartz kindle
#

just add something to the database everytime the command is run

glacial sentinel
#

well wouldn't that be super unoptimized?

quartz kindle
#

there are many ways to do it, depending how how much information you need, and which timeframes you want to record

glacial sentinel
#

I just want to know the amount of users that used a command in the last 5-10 mins

quartz kindle
#

if you need the last 10 minutes only, and never more than that, you can check for timestamps and delete anything that is older than 10 minutes

glacial sentinel
#

but Lol it will be expensive to insert a new row for every command that's done

#

You will also have to check that there is no command from that user in the table

quartz kindle
#

other than that, if you want to save 10-minute time frames, then you need a row for every 10 minutes

#

you dont need new rows

#

you can increment a value in a row

glacial sentinel
#

but what if a user is using more than 1 command in those 10 minutes?

#

it will count him multiple times, I dont want that

quartz kindle
#

then you also need to track users

#

so you want both active users and the amount of times the command was used?

glacial sentinel
#

no just the active users

#

but if a user uses more than one command it shouldnt count him more than once

quartz kindle
#

then create a row for the user, and delete users older than 10 minutes

#

and check if row already exists before creating

glacial sentinel
#

but creating a row for every command will be expensive asf

#

and checking if the table already has a row of that user

quartz kindle
#

make a memory table

#

you dont need to persist the data

glacial sentinel
#

how do I do that ThinkPika

quartz kindle
#

when you create a table in mysql, you can set the engine used

glacial sentinel
#

memory?

quartz kindle
#

^

#

yes

glacial sentinel
#

okay Imm try it

#

thx

quartz kindle
#

memory tables are never saved to disk, so all operations should be fast enough

glacial sentinel
glacial sentinel
#

@quartz kindle Works, thanks :D

quartz kindle
#

np :3

glacial sentinel
#

Killed my server memory tho LunaUp

#

I don't think there is an optimized solution for this Lol

quartz kindle
#

how much memory did it use?

#

do you have a lot of data?

#

was it properly deleting stale data?

glacial sentinel
knotty steeple
glacial sentinel
#

how much memory did it use? well Idk exactly but my memory is almost capping usually anyways and that really made the bot lag
was it properly deleting stale data? yea

knotty steeple
#

the

#

shapes

waxen quest
#

I was looking at the docs, but I can't seem to figure out, how to check if the bot can DM a user, nodeJs.

glacial sentinel
#

discord.js?

quartz kindle
#

that shouldnt be happening, so idk

glacial sentinel
#

user.send(msg)

waxen quest
grand tartan
#

permission check

#

hmm

glacial sentinel
#

@quartz kindle It's fine it was just to see for fun so I did it for 10 minutes and disabled

waxen quest
#

yes but what permission ? 🤔

glacial sentinel
#

@waxen quest it's not sharing a server with the bot/disabled dms from non friends

grand tartan
#

if i do ;ban it should say you are not aloud to do this

waxen quest
#

yeah, do you know how do I check if he has that disabled?

grand tartan
#

i deleted the file rip

#

dont really need it it just wont let you do it

topaz fjord
#

@waxen quest try to send the message, catch the error, send message saying I can't dm you

glacial sentinel
#

doesnt look like you can check

topaz fjord
#

you can't

waxen quest
#

Good idea, thanks @glacial sentinel and @topaz fjord

topaz fjord
#

thats why you have to make the check yourself

quartz kindle
topaz fjord
#

@quartz kindle dark inspect

#

gib

glacial sentinel
#

If a user has dms disabled it's his fault not mine LunaUp I don't bother with that

topaz fjord
#

I changed mine so it send in channel

knotty steeple
#

oh ok

#

can you not put a box shadow on both sides of something

#

very shit

topaz fjord
knotty steeple
#

ok yes

topaz fjord
#

you just have to put negative pixels

knotty steeple
#

for what

fervent oyster
#

Anyone using lavaink on an arm computer? Can't get playback to work

topaz fjord
#

Anyone with mongodb knowledge do you know how to delete all dup's except one

waxen quest
#

    if  (message.content.toLowerCase() == Prefix + "daily") {

    let cooldown = 10000;
  
    let lastDaily = await db.fetch(`lastDaily_${message.author.id}`);
  
    if (lastDaily !== null && cooldown + (Date.now() - lastDaily) > 0) {
    let timeObj = ms(cooldown - (Date.now() - lastDaily));
      
      message.channel.send(CooldownErrorMsg1 + ` (**${timeObj.hours} hours** and **${timeObj.minutes} minutes** left)`);
    
    } else {
    
      message.channel.send(BackgroundSuccessMsg5);
      userData[message.author.id].Profile_Chests += DailyAmount;

      db.set(`lastDaily_${message.author.id}`, Date.now());
      
    };

};```

Anyone knows why this command results in this?
bright spear
topaz fjord
#

ye

#

I saw

bright spear
#

o

earnest phoenix
#

@bright spear what is this

quartz kindle
#

@waxen quest cooldown + (Date.now() - lastDaily) > 0 will always be bigger than 0

waxen quest
#

Thank you

steel drum
#

what hosts

#

accept paypal credit

ivory pebble
knotty steeple
#

wait for it to spawn shards

ivory pebble
#

How do I do that..

#

ive tried doing if(!client.shard)

#

That didn't work..

lost scarab
#

so when i try to use that code

#

thats what happens

#

but i only want the box under that to get the background color

steel drum
#

what hosts
accept paypal credit

night imp
#

@steel drum almost none

#

Hosts use recurring payments

#

which can only be done through linked cc/dc accounts iirc

steel drum
#

i mean from what i heard you can use paypal to pay for spotify premium

#

and they do recurring payments

night imp
#

hmmm

#

They may have a balance type thing

#

ie deposit money to their site

inland tinsel
#

Hey, anyone know how to make custom commands with blarg bot like this: !suspend
License
Canadian
Reason

and it say back in a suspension channel:
BOT:
Suspension: License
Username: Canadian
Reason: Reason
but it's a different thing each time, so it's like input fields or something

night imp
#

I would contact the host in question

steel drum
#

the thing is

night imp
#

@inland tinsel ask on their support page

inland tinsel
#

they dont have one

#

q.q

steel drum
#

im looking for a host

inland tinsel
#

i dont think

steel drum
#

what do u guys use to host

inland tinsel
#

checking

night imp
#

galaxygate

#

Very very good people

earnest phoenix
#

I use webdock

#

Webdock trades storage for CPU

#

So basically, they offer less storage but a beastly cpu

#

I'm on the 50 GB plan, which is enough for my bot

lost scarab
#

anyone

earnest phoenix
#
bot.on('messageDelete', message => {
      if (!message || !message.id || !message.content || !message.guild || message.author.bot) return;
      const channel = message.guild.channels.find("name", "log");
      if (!channel) return;
      let mdembed = new Discord.RichEmbed()
         .setAuthor(`${message.author.tag}`, message.author.avatarURL)
         .setColor('RANDOM')
         .setDescription(`Deleted the message:\n
`\n"+message.cleanContent+"\n`
`)
         .setTimestamp();
       channel.send(mdembed);
       })
#

have erroe

#

error

#

/app/server.js:101

\n"+message.cleanContent+"\n

^

SyntaxError: Invalid or unexpected token

at createScript (vm.js:80:10)

at Object.runInThisContext (vm.js:139:10)

at Module._compile (module.js:617:28)

at Object.Module._extensions..js (module.js:664:10)

at Module.load (module.js:566:32)

at tryModuleLoad (module.js:506:12)

at Function.Module._load (module.js:498:3)

at Function.Module.runMain (module.js:694:10)

at startup (bootstrap_node.js:204:16)

at bootstrap_node.js:625:3
regal pilot
#

Name of command ?

earnest phoenix
#

this not command

#

this in server.js

regal pilot
#

Sorry im codding too much commands

fervent oyster
bright spear
#

@earnest phoenix the \n has to be inside the string

earnest phoenix
#
bot.on('messageDelete', message => {
      if (!message || !message.id || !message.content || !message.guild || message.author.bot) return;
      const channel = message.guild.channels.find("name", "log");
      if (!channel) return;
      let mdembed = new Discord.RichEmbed()
         .setAuthor(`${message.author.tag}`, message.author.avatarURL)
         .setColor('RANDOM')
          .setDescription(`Deleted the message:\n\n${message.cleanContent}\n`)
         .setTimestamp();
       channel.send(mdembed);
       })

now no errors but not work

#

ia there a channel named log? @earnest phoenix

#

also using find like that is becoming deprecated

#

you'll have to use a function

knotty steeple
#

maybe thats why

#

use a function

#

uh => uh.name === "thing"

earnest phoenix
#

what is

#

not work

#

is there a channel named log tho

#

@earnest phoenix yes i have the channel "log"

#

you sure you don't have an error

earnest phoenix
#

@eternal blaze What library

#

Discord.py is

async def dm(ctx, user: discord.User):
    await user.send("hey")
eternal blaze
#

Yep

patent reef
#

Anyone know where RethinkDB dumps are placed in Ubuntu after running sudo rethinkdb dump?

knotty steeple
#

am i allowed to remove the ad thing on bot pages?

earnest phoenix
#

you can do that?

knotty steeple
#

yes with some ez css

earnest phoenix
#

display: none; probably

knotty steeple
#

i asked if its allowed

earnest phoenix
#

I can see that

mental solstice
#

Trying to get the first mentioned user in a message. What am I doing wrong? let user = message.mentions.users[0];

knotty steeple
#

.first()

#

message.mentions.users.first()

mental solstice
#

ok, what if i need to get the second?

knotty steeple
#

map the mentions

#

and get the second one

#

u can do that

#

probably

mental solstice
#

if i need to, ill figure it out. Just trying to get back into js from c#.. but i appreciate the help

agile star
#

!join

coral trellis
knotty steeple
#

how do you color the triangle thing next to tags

#

also can you hide the donate button

#

im gonna do it because its useless for me

earnest phoenix
#

It's not against the rules

#

Only the report, delete, and vote buttons

#

but who on earth would want to hide the vote button?

#

@knotty steeple Looks like you managed to the Medal.tv alert

knotty steeple
#

?

earnest phoenix
#

oh wait

#

you didn't

#

nvm

signal saffron
knotty steeple
#

guilds is undefined mmLol

signal saffron
#

how do i define

earnest phoenix
#

using JavaScript

quartz kindle
#

are you running that code before the ready event?

#

you're trying to get guilds size before guilds becomes available

vocal meteor
earnest phoenix
#

ok

earnest phoenix
#

hi

#

can i get help with my bot

#

it isnt working..

#

when i do node to connect it

#

i did node .

#

on visual studio but it hasnt been working

#

and it didnt give me the confirmation message.

#
bot.on('messageUpdate', message => {
  console.log(`עובד`)
      //if (!message || !message.id || !message.content || !message.guild || message.author.bot) return;
      const channel = message.guild.channels.find(uh => uh.name === "log");
      if (!channel) return;
              console.log(`עובד 1`)
      let mdembed = new Discord.RichEmbed()
         .setTitle(`**__הודעה נערכה__**`)
         .setAuthor(`עורך ההודעה: ${message.author.tag}`, message.author.avatarURL)
         .setColor('RANDOM')
          .setDescription(`**ההודעה:**\n${oldMessage}
                           **ההודעה אחרי עריכה:**\n${newMessage}`)
         .setTimestamp();
              console.log(`עובד 2`)
       channel.send(mdembed)
       })

errors in the "oldMessage"
and "newMessage"

jagged plume
#

oldMessage and newMessage are never defined?

earnest phoenix
#

not defined

jagged plume
#

yes

earnest phoenix
#

yes

#

@jagged plume u can help me?

#

you need to specify oldMessage and newMessage in the function arguments

#

u can do that? i dont understand how to do

#

@earnest phoenix 1. vsc doesn't have a conformation code

#
  1. have you tried node <filename>.js
#

its in server.js

#

ok cool

earnest phoenix
#

@earnest phoenix what's the error?

waxen quest
#

a.atag::after {border-left: 10px solid #793a3a}
@knotty steeple if you still need it

sick cloud
#

does anyone have regex knowledge, and can help me make some regex that turns mentions like @worthy silo to @Username in plain text?

#

trying to make a cleanMessage function

bitter sundial
#

you cant turn an id into a username with regex

zealous veldt
#

I think he means identifying where the IDs are

earnest phoenix
#

@sick cloud if ur using discord.js, there is message.cleanContent that resolves mentions to names

sick cloud
#

i need the raw regex @earnest phoenix

#

my lib cant depend on discord.js just for that

waxen quest
#

You can try using Glitch.com, it's great to see and learn how the stuff works 🤠
@earnest phoenix

earnest phoenix
#

u cant regex an id into a name

late hill
#

oof

earnest phoenix
#

and replace the mentio nwith the username

#
 /<@!?[0-9]+>/g;
shadow barn
#
        .setTitle( Guild.name + " Information")
                   ^

ReferenceError: Guild is not defined```
#

Anyone that can help me with this?

#

discord.js is imported into the project

bitter sundial
#

replace Guild with an actual guild object such as message.guild

shadow barn
#

oh ok, thank you

raven schooner
#

Ok

#

Hello

earnest phoenix
#

Ok Hello

shadow barn
#

What's the text limit in embedded messages?

bitter sundial
knotty steeple
#

@waxen quest yes i still need it ty

waxen quest
#

Np 🤠

knotty steeple
#

@bitter sundial are you allowed to remove alerts on bot pages

#

@earnest phoenix pls

#

@waxen quest still doesnt change on hover

earnest phoenix
#

what element?

#

ill help u with css

knotty steeple
#

the

#

tags

#

atag

earnest phoenix
#

ok 1 sec

knotty steeple
#

wait got it

earnest phoenix
#

seems to be border color

#

for the after?

#

like the arrow i guess

knotty steeple
#

yes

knotty steeple
#

how do you change the color of the delete button

#

.bot-btnss doesnt work on it

bitter sundial
#

#delete

knotty steeple
#

i already tried that it didnt work Thonk

#

oh

#

you need !important

loud helm
#

How can i let my bot generate an image and let it send it??

knotty steeple
#

canvas-constructor

loud helm
#

thx

knotty steeple
#

though to send it you have to turn the image into a buffer

#

then send that buffer as an image

loud helm
#

okay

worldly obsidian
topaz fjord
#

what lang

#

If js you can use canvas it jimp

worldly obsidian
#

discord.js

topaz fjord
#

then you could use canvas or jmp

knotty steeple
#

jimp is slow

topaz fjord
#

It's still an option

knotty steeple
#

but a shit one

worldly obsidian
#

I do not know how he works

topaz fjord
#

They both have docs

worldly obsidian
#

ok thans you

quartz kindle
#

just pls dont read images from disk every single time they are required lul

earnest phoenix
#

remember that guy that did sync fs read on every command topkek

#

i nearly died

#

hes like "thats not the problem im trying to fix something else"

knotty steeple
#

wait tell me how that is bad

#

xd

earnest phoenix
#

because sync = block event loop

#

and node is literally for async io

knotty steeple
#

oh

bitter sundial
#

I'm glad they have the sync option for quick shits

#

but

#

They should probably hide it so people dont see it

earnest phoenix
#

i swear when i google it forst SO answer is always "just use fs.readSync()"

#

and comments is shitshow of answers from people trllign them why its wrong

#

and others saying "well its ok in some situations"

#

and then discord bots devs eat that shit up

bitter sundial
#

they're not wrong, it's okay in some situations
they should go more into detail on what situations tho

earnest phoenix
#

wrong situation: reading file on every command zoomeyes

#

i think i use it on startup of my bot to load some things but just cos i havent touched that code in forever

#

i could just wrap the async one in promise Thonk and await that b

#

I just use fs-promise and await

#

yeah when u think about it theres not many situations to really use readsync

quartz kindle
#

i use sync to write to disk

#

its safer

#

and to read on bot start up of course

earnest phoenix
#

isnt it only unsafe if ur writing to the same file?

#

It is unsafe to use fs.write() multiple times on the same file without waiting for the callback. For this scenario, fs.createWriteStream() is recommended.

#

yea

glacial sentinel
#

is there an official discord for eris.js

#

and if not how do I setup shards with that

earnest phoenix
#

there is a eris channel

glacial sentinel
#

good enough xd

#

ty

quartz kindle
#

its safer in the sense that it halts the bot until the write is complete, so it doesnt risk getting corrupted from another command crashing the bot

earnest phoenix
#

but then when u shard

#

ripperino

#

what are u writing files for? jsut curious

quartz kindle
#

user-generated images

earnest phoenix
#

store imade in db awesmart

quartz kindle
#

ew

earnest phoenix
#

🤷 i just think will be bad for u to write many files sync. u could store a timestamp or something on the end of filename so it has less chance of clash

quartz kindle
#

i have 3000+ user-generated images, 200+mb

glacial sentinel
#

How to setup shards for more than 10,000 servers Eris.JS

earnest phoenix
#

it has internal sharding

#

or use eris-sharder if u want clustering

glacial sentinel
#

okay whats the best to use Lol

bitter sundial
#

user uploaded images?

quartz kindle
#

user-generated

#

canvas

bitter sundial
#

oh

#

why do you save them

quartz kindle
#

so i dont need to regenerate when they need it again

bitter sundial
#

so a cache system

quartz kindle
#

kinda, but more like file storage for users

earnest phoenix
#

store in db angery

bitter sundial
#

if you have unique filenames that shouldnt be a problem tho

earnest phoenix
#

Database ^^

quartz kindle
#

filenames are timestamp-based, so yeah

glacial sentinel
#

where do I put this in Eris JS for shards maxShards: "auto"

bitter sundial
#

then stop writing synchronously

earnest phoenix
#

in clientOptions @glacial sentinel

glacial sentinel
#

wheres that ThinkPika

quartz kindle
#

i've had issues with image files being corrupted before, thats why i switched to sync

knotty steeple
#

new Eris(token, {options})

glacial sentinel
earnest phoenix
#

^ tickYes

glacial sentinel
#

I got this

earnest phoenix
#

when u make new eris instance

glacial sentinel
#

okay ty @knotty steeple

earnest phoenix
#

u know what nvm samurai explanation is enough

#

oh yeah thats better after the edit

glacial sentinel
#

will this work for 10k+ serves?

earnest phoenix
#

depends on ur server and ur code

glacial sentinel
#

I dont need another like index js file that runs the shards like in discord.js?

earnest phoenix
#

but it should

#

not unless you use eris-sharder @glacial sentinel

glacial sentinel
#

hm ok ty

amber junco
#

Umm.. hello! My bot won’t let me type ‘’node index’’ Whenever I typed it it just created a new line in command promptl

knotty steeple
#

are clusters better @earnest phoenix

glacial sentinel
#
var bot = new Eris(botconfig.token);
          ^

ReferenceError: Eris is not defined```
I did `npm install --no-optional eris` ![Thonk](https://cdn.discordapp.com/emojis/356771720863940608.webp?size=128 "Thonk")
amber junco
#

?

knotty steeple
#

did you define eris?

glacial sentinel
#

oh xd

#

that's what the page showed LunaUp

#

ty works

earnest phoenix
#

well eventually running on 1 thread will catch up to you @knotty steeple

#

but honestly i think even tombot could run without any clusters and be fine

#

if ur bot does some cpu intensive stuff clusters maybe more important

#

but then why use node

amber junco
#

@knotty steeple WDYM?

earnest phoenix
#

he wasnt answering ur q

amber junco
#

Oh

earnest phoenix
#

if ur bot is running in command line

#

u can stop it probably with ctrl+c

amber junco
#

Ok

earnest phoenix
#

and then u can type in console again

#

while its running you cant

#

or just open another awesmart

quartz kindle
#

an empty new line means the bot is running/working

#

lul

earnest phoenix
#

or use process manager

tiny lodge
#

@pearl parcel you can't dm users you don't have common guilds with, and if you mean dm through the bot, get the user from ID and dm

fluid basin
#

do it via the bot

pearl parcel
#

i might just remove the feedback command actually and have a support server, probably easier

tiny lodge
#

ok

pearl parcel
#

ty anyway

uncut delta
#

Gg

earnest phoenix
#

where can I find like number 1000 = 1k
like formatter, if you want to say google it then what the key will i search?

earnest phoenix
#
bot.on('roleCreate', (role, message) => {
      if (!message || !message.id || !message.content || !message.guild || message.author.bot) return;
      const channel = message.guild.channels.find(uh => uh.name === "log");
      if (!channel) return;
      let mdembed = new Discord.RichEmbed()
         .setTitle(`**__רול נוצר__**`)
         .setAuthor(`יוצר הרול: ${role.created.tag}`, message.author.avatarURL)
         .setColor('RANDOM')
          .setDescription(`**שם הרול:**\n${role}`)
         .setTimestamp();
       channel.send(mdembed)
})

someone can fix this to me?

#

its not work

earnest phoenix
#

what about it is not working

#

also why are you checking for message variables

#

when its a role

earnest phoenix
#

um

#

my bot wont..

#

join a server..

#

but it worked the last link

earnest phoenix
#
bot.on('roleCreate', (role) => {
  console.log(`עובד`)
      const log = bot.guild.channels.find(uh => uh.name === "log");
    console.log(`2 עובד`)
      if (!log) return;
      let mdembed = new Discord.RichEmbed()
        console.log(`3 עובד`)
         .setTitle(`**__רול נוצר__**`)
         .setAuthor(`יוצר הרול: ${role.created.tag}`, role.created.avatarURL)
         .setColor('RANDOM')
          .setDescription(`**שם הרול:**\n${role}`)
         .setTimestamp();
       log.send(mdembed)
})
#

@earnest phoenix

young cradle
#
console.log(`3 עובד`)

is what causes to throw an error there.

earnest phoenix
#

you sure?

#

actually

#

maybe it is

#

they should put it underneath

#

Hello. The bot on my server keeps going offline for some reason. At first I though there is a problem with the server where I have the bot so I started my local one. That one also goes offline. Can anyone tell me why would it do that?

#

what you mean?

#

I made a bot

#

upload it to a server

#

and for 1 month it worked perfectly

#

today it started going offline and coming back online

#

So I said maybe its a server problem. I runned my local bot to check

#

and my local one also goes offline

zenith moss
#

Any error?

earnest phoenix
#

nop

#

nothing appear in my console

knotty steeple
#

maybe discord is having connection problems

zenith moss
#

Might

earnest phoenix
#

o so that is a posability?

knotty steeple
#

yes

earnest phoenix
#

is there something I can do in this case?

knotty steeple
#

nope

#

i keep getting ECONNRESET so

earnest phoenix
#

guys, is there a way to "detect" region change with discord.js?

worldly obsidian
#

someone has the code or trick to help with jimp

knotty steeple
#

no one is giving you code

worldly obsidian
#

did you have something to help me?

knotty steeple
#

no

worldly obsidian
#

ok

knotty steeple
#

but ur asking for code

#

im just telling you

#

no one is going to give you

lofty hamlet
#

Guys ?

late hill
#

Yes sir

lofty hamlet
#

:

earnest phoenix
#

baguette

lofty hamlet
#
            fonction.channellogs(message)
            if (!Dresseurs[sender.id]) return message.channel.send(`Vous devez être un dresseur pour commencer (Commande : \`${prefix}Start\` )`)
            var Dresseur = [];
            var NbPokemons = NbPokemons
            var Team = Team
            var Noms
            var nb = 0;
            var rank = 0;
            for (var i = 0; i < message.guild.members.map(user => user.username).length; i++) {

                if (Dresseurs[message.guild.members.map(user => user.id)[i]]) {
                    nb++;
                    var Dresseur1 = Dresseurs[message.guild.members.map(user => user.id)[i]];
                    Dresseur[nb] = {
                        Points: Dresseur1.Points,
                        NbPokemons: Dresseur1.NbPokemons,
                        Team: Dresseur1.Team,
                        Nom: Dresseur1.NomDresseur
                    }
                }
            }

            Dresseur.sort(function (a, b) {
                return b.Points - a.Points;
            });
            for (var i = 0; i < nb; i++) {
                if (Dresseur[i].id == i) {
                    rank = i;
                }
            }
            var TopMsg = "";
            var topcount = 1
            for (var i = 0; i < 6 - 1; i++) {
                if (Dresseur.length < 5) return message.channel.send('Pas assez de Dresseurs sur ce Discord pou effectuer la commande : **Top** (- de 5 Dresseurs)')
                TopMsg += (`\n[**${topcount}**] - ` + `**${Dresseur[i].Nom}**` + " : " + `**${Dresseur[i].Points}**` + " Points | " + `**${Dresseur[i].NbPokemons}**` + (' Pokémons | Team : ' + `**${Dresseur[i].Team}**`))
                topcount++
            }
            const TopPoints = new Discord.RichEmbed()
                .setColor(0xFF88FF)
                .addField("Top Dresseurs du Discord :", TopMsg, false)
            message.channel.send(TopPoints)
        }```
#

How to make my top shows the trainers of ALL discords

#

@late hill

late hill
#

uhm

lofty hamlet
#

So @late hill ?

knotty steeple
#

hi dont ghost ping random people

lofty hamlet
#

I ping just weslay

earnest phoenix
#

is there a way to detect a server region change?

late hill
#

Your code

#

Is hard to read

lofty hamlet
#

You can go private ?

earnest phoenix
#

no

#

l-yardım

#

ha

earnest phoenix
#

Hey i have a problem with my gif (dog and cat) code:

#
if(message.content.startsWith(`${prefix}dog`)) {
    let {body} = await superagent.get(`https://random.dog/woof.json`)

    let dogembed = new Discord.RichEmbed()
    .setAuthor('Dog')
    .setColor('RANDOM')
    .setImage(body.url)

    message.channel.send(dogembed)
    message.delete()
}```
#

the error:

#

SyntaxError: await is only valid in async function

#

any idea what the problem might be?

#

looks like like superagent isn't an async function @earnest phoenix

topaz fjord
#

await is only valid inside an async function

#

@earnest phoenix ^

earnest phoenix
#

ik

#

but

#

how i can make for repair my code

#

for always be a gif code

#

remove it

#

...

#

but

#

let {body} = superagent.get(https://random.dog/woof.json)

#

that's it

#

you can't use await with superagent

#

some problems

#

so

#

@earnest phoenix

#

first things first

#

remove await from your code

#

k

#

and

#

you need to put `

#

k

#

before and after the link

#

oh

#

nice

topaz fjord
#

that wont work since .get returns a promise

#

afaik

earnest phoenix
#

i've never used superagent

#

i can't help much

topaz fjord
#

and await need async

#

like I said

earnest phoenix
#

ReferenceError: superagent is not defined

#

...

#

have you imported it?

#

yes

#

:/

#

can you send me prints?

#
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\darkr\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\darkr\package.json'
npm WARN discord.js@11.4.2 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN darkr No description
npm WARN darkr No repository field.
npm WARN darkr No README data
npm WARN darkr No license field.

+ superagent@4.0.0-beta.5
updated 1 package in 1.59s```
#

I mean

#

inside the class

#

const superagent = require(`superagent`);

#

ty

#

:/