#development

1 messages ยท Page 528 of 1

empty owl
west raptor
#

you arnt allowed to do that unless you have a ToS saying you can

#

also

empty owl
#

They have many examples on hat

west raptor
#

read the docs

empty owl
#

@earnest phoenix guildMemberAdd

earnest phoenix
#

what about it

empty owl
#

Replace ready with guildMemberAdd

#

Like a welcome message

serene sun
empty owl
#

U have to install other npms to install that

#

And fortnite bot ew

serene sun
#

๐Ÿ˜ฆ

#

pog

#

how would i go about downloading the other npm's?

west raptor
#

@empty owlno

#

@serene sun you provided an invalid token

empty owl
#

And "an invalid token was provided"

serene sun
#

oooh like the discord bot token?

west raptor
#

yes

serene sun
#

is that the whole problem?

west raptor
#

mhm

serene sun
#

and let me try changing it

west raptor
#

okay

shadow dust
west raptor
#

it's not Client Secret

serene sun
#

@west raptor it didnt fix it ๐Ÿ˜

earnest phoenix
#

Ye, that means it worked

serene sun
#

can anyone else help?

earnest phoenix
#

the warnings mean nothing

serene sun
#

oh

#

@earnest phoenix ay thank you so much

earnest phoenix
#

Np

west raptor
#

@earnest phoenix pls

#

if you dont know what you are talking about dont say anything, that's not his issue

#

his issues is that the token provided is incorrect

earnest phoenix
#

Anyone know what this means?
TypeError: Error when sending eval response to master process: Converting circular structure to JSON

smoky spire
#

It means you are trying to put an object with reference to itself into json

earnest phoenix
#

Whut?

#

๐Ÿ˜‚

inner jewel
#
const a = {};
const b = {};

a.b = b;
b.a = a;```
#

you're probably returning a library object

#

eg a member

smoky spire
#

so, a.b.a is circular

earnest phoenix
#

Would this be it?

client.shard.broadcastEval(`let guildDef = this.guilds.get('${config.ids.loungeID}'); let user; let hasRole; if(guildDef) user = guildDef.members.get('${message.author.id}'); if(user) { if(guildDef.member(user).roles.some(r=>["Yagami Premium"].includes(r.name))) { hasRole = "true" } else { hasRole = "false" } } else hasRole = "false"; hasRole;`).then(res => {
#

@inner jewel

fair dew
#

How do you guys keep your bot up and running 24/7?

earnest phoenix
#

VPS

fair dew
#

do you guys use VPS? If so, which?

earnest phoenix
#

Use GalaxyGate lol

knotty steeple
#

check pins

#

decide on what you want

fair dew
#

Okay, thank you

earnest phoenix
#

Samurai, please can you help me? ๐Ÿ˜‚

knotty steeple
#

i would recommend galaxygate

#

or digitalocean

fair dew
#

I'll check into that

knotty steeple
#

but pls dont use ovh

earnest phoenix
#

lul

knotty steeple
#

ur json is in a circle

#

thats all i can say

earnest phoenix
#

...

earnest phoenix
#

why do i keep randomly get these

(node:32238) DeprecationWarning: Collection#find: pass a function instead
west raptor
#

well

#

read the error

earnest phoenix
#

well i have no idea where the error is happening

west raptor
#

happening in multiple places probably

valid frigate
#

are you calling Collection#find like collection.find()

earnest phoenix
#

yup

valid frigate
#

o

earnest phoenix
#

im saying yup to other thing

#

xd

west raptor
#

he is

#

doing

#

collection.find('thing', 'value')

earnest phoenix
#

i have no collection.find

west raptor
#

u do

earnest phoenix
#

wait, yes i do

valid frigate
#

lMao

west raptor
#

lMAo

#

yes

earnest phoenix
#

for roles

#

oof

#

ok,how can i give role on member join

valid frigate
#

does collection.find accept a callback as its second option thonkku

west raptor
#

idk

valid frigate
#

oh apparently not

#

also for roles i'd suggest using .get() instead

earnest phoenix
#

ive 2 roles here, no clue how to add them though in a member add event

    let role1 = member.guild.roles.find("name", "โ–ƒโ–ƒโ–ƒโ–ƒโ–ƒโ–ƒโ–ƒโ–ƒโ–ƒโ–ƒ");
    let role2 = member.guild.roles.find("name", "Player ๐Ÿ‘Š");

ive tried

member.addRole(role1)```
and same fro role 2 and it does not work
valid frigate
#

its worth reading the warning as well

earnest phoenix
#

the find role part is ok

quartz kindle
earnest phoenix
#

how can i see if a message has a link in it

bright spear
#

Just see if it has :// ig

earnest phoenix
#

Can you fs.writefile on glitch. Doesnt seem like its working

#

you can

#

but can you dont use glitch

#

im using glitch temperally

#

yes my spelling is trash ;p

#

thats fine i guess

#

its good for betas and such

#

yeah void is in beta

#

and i want to release it now.

knotty steeple
#

temporarily

sick cloud
#

@earnest phoenix if you release early

#

bugs

#

less servers bc crap

#

i released yt too early back when i did and it was a slow grower

earnest phoenix
#

dont care for now

sick cloud
#

lmao great bot dev

earnest phoenix
#

โค

#

ill change voids hosting app

#

if u give me suggestions to where i should put it

sick cloud
#

vps

earnest phoenix
#

free cause im poor

sick cloud
#

none then

earnest phoenix
#

yep lmao

sick cloud
#

dont make a bot if you cant maintain it

ruby dust
#

better make only selfhostable then

earnest phoenix
#

thank you for the support.

#

-_-

knotty steeple
#

i mean

#

i host my bots on friends' vps

safe path
#

Python coders, how do you grab an username from a message? for example: !somebotthing wave to @user1! then grab user1 and make a response like Bot: hi, @user1!

knotty steeple
#

use a converter

#

i think thats what you call it

#

user: discord.Member

empty owl
#

someone help me!

#
(node:332) UnhandledPromiseRejectionWarning: RangeError: RichEmbed field values may not be empty.

    at RichEmbed.addField (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/structures/RichEmbed.js:165:34)

at Object.module.exports.run (/app/cmds/8ball.js:20:8)

at Client.bot.on (/app/index.js:39:28)

    at emitOne (events.js:116:13)

    at Client.emit (events.js:211:7)

    at MessageCreateHandler.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)

    at WebSocketPacketManager.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)

    at WebSocketConnection.onPacket (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)

    at WebSocketConnection.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)

    at WebSocket.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)

(node:332) 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:332) [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.

knotty steeple
#

have you ever read an error before

empty owl
#

the richembed isnt empty tho

knotty steeple
#

js doesnt throw errors for no reason

empty owl
#

want to see my whole code

#

i can send u it

earnest phoenix
#

the name/value of a field is empty

#

in case you couldn't conclude that after 2 seconds of reading the error

quartz kindle
#

you're probably trying to set the field value with a variable, but the variable is broken/empty

earnest phoenix
smoky spire
#

Gotta resolve the promise

valid frigate
#

you're setting a variable to a promise so you have to await it mmLol

earnest phoenix
#

Oh fml

quartz kindle
#

check if you're not setting 500 instead of adding 500

earnest phoenix
#

Oh thanks

#

My bot is online but its no longer responding

#

no errors or broken code

#

restart it or check the prefix in your file

#

its in glitch

#

it auto restarts

#

and prefix is fine

#

i just changed the stats and it changed

#

but no commands

slim heart
#

Well read over what you changed and make sure you didn't do anything wrong like return after it so it doesn't find the rest of the commands, missing } or ) stuff like that

empty owl
#

@earnest phoenix maybe ur token is reset

#

that happened to me

#

I used glitch and it autosaved too many times

#

and then discord kicked it from the api

#

oof

#

and glitch is not a good vps

slim heart
#

if the bot goes online then it's not a token problem

empty owl
#

its not even a vps

slim heart
#

also it'd return an error

valid frigate
#

console.log the shit out of that

empty owl
#

also help

#
      let member = message.mentions.users.first().username
      let secondMember = message.mentions.users.second().username
      let numbers = Math.floor(Math.random() * 100) + 0
      let loveEmbed = new Discord.RichEmbed()
        .setTitle(`The percentage of success!`)
        .setDescription(`${member} has a ${numbers}% chance having a lasting relationship with ${secondMember} `)
      message.channel.send({embed: loveEmbed})```
#

how do I get to mentions?

valid frigate
#

if it goes online, that means it might not be handling messages correctly

slim heart
#

Wdym "get to mentions"

bright spear
#

@empty owl wdym?

empty owl
#

two

valid frigate
#

it's just message.mentions.first()

empty owl
#

but I need two

valid frigate
#

oh

slim heart
#

which you are doinjg?

empty owl
#

like x-lovecaculate @ @

#

js

#

node.js

bright spear
slim heart
#

lol

empty owl
#

??????

smoky spire
#

message.mentions.users.first(2)

empty owl
#

ok thx

#

shouldnt it be first(1)

smoky spire
#

You want 2 right?

empty owl
#

because the other one should be first(0)

#

yea

smoky spire
#

It's not an index, it's an amount

empty owl
#

ok

#

it says its undefined @smoky spire

serene sun
#

would anyone be able to help me with locking a bot then unlocking it 1 minute later for certain roles

empty owl
#

?????

#

locking and unlocking??

smoky spire
empty owl
#

o

#

should it be

#

.first([2])

smoky spire
empty owl
#

?

smoky spire
#

const mems = message.mentions.users.first(2);
const mem1 = mems[0];
const mem2 = mems[1];

empty owl
#

um

#

what

smoky spire
earnest phoenix
#

well imma just recopy the files into another project ;/

empty owl
#

mk

earnest phoenix
#

uptime broke it cause i set it to 6 mins

#

so its uptime was 12% ๐Ÿ˜‚

slim heart
#

@empty owl basically the .first(2) is the amount of things you're going to get, so it's going to get the first 2 mentions, and then throw that in an array that you can then get from with [index] yada yada. So you're not getting the object with (1) and (2) thats the amount you're collecting

serene sun
#

@empty owl i meant like not allow some roles to send messages in a channel then allow them to

empty owl
#

ok

#

like a mute cmd? @serene sun

#

idk about that

sick cloud
#

use discord permissions

serene sun
#

no like not allow them to send in a text channel

sick cloud
#

right click on a channel

#

add a member or role

#

deny send messages

#

boom

serene sun
#

no but i want like timing for it

empty owl
#

I mean u can add a verify role then

sick cloud
#

uh

#

then remove it

#

after x<>

#

?

serene sun
#

its for a fortnite bot

empty owl
#

like wait 10 min to send message

#

ew fortnite

sick cloud
#

LMFAO FORTNITE

#

ok bye

slim heart
#

what do you need a fortnite bot to mute people

empty owl
#

too popular

#

EVeryone is making a fortnite bot

slim heart
#

fortnut

sick cloud
#

fortshit

serene sun
#

everyone keep saying that about a fortnite bot pog

empty owl
#

pog?

serene sun
#

pogchamp

empty owl
#

pogchamp

sick cloud
#

theres enough already

empty owl
#

LMAOOOOOooOOoOO

serene sun
#

@slim heart i want the text channel to be locked so people cant type in it, then open for like one minute, then just close again

earnest phoenix
#

umg im making a fortnite bot

#

;-;

#

THERES NO DAB EMOJI WHAT IS THIS SERVER

empty owl
#

why do u want to make a fortnite bot

slim heart
#

then m a k e one

serene sun
#

i wish i could lol, thats why i came here for help

empty owl
#

theres too many
anime
fortnite
gaming
games
fun
utility
bots

earnest phoenix
#

music

sick cloud
#

theres too many bots

#

lets stop

empty owl
#

yup

slim heart
#

ban them all

earnest phoenix
#

delete them and start from scratch

empty owl
#

mk someone help me with actual stofff

#

so

serene sun
#

^^

slim heart
#

-ban @ everyone:bots

empty owl
#

do I do x-lovecaculate @1 @2

slim heart
#

f a c e p a l m

#

ok look at it

#

what does the result look like

#

@slim heart

#

right

empty owl
#

bobthemoose - percentage

#

no

#

its bobthemoose - percent - undefined

slim heart
#

no like what the result of grabbing the shizzle

empty owl
#

o

slim heart
#

right

#

so you have your @'s

#

that's a whole string

empty owl
#

ye

slim heart
#

not a user object

#

so

empty owl
#

o

slim heart
#

you could probably do that idk but that'd be really dumb and if you want to do it right

#

get the id out of that

#

and .get the user

empty owl
#

o

slim heart
#

then + userobj in a message send will end up as an @

empty owl
#

what if I only want the username

slim heart
#

userobj.username

inner jewel
#

no

empty owl
#

let member = message.mentions.users.first().username
let secondMember = message.mentions.users.first([2]).username

#

this wont work right?

inner jewel
#

it won't

slim heart
#

no it wont

empty owl
#

ok

inner jewel
#

also you don't need to extract userid from the string

slim heart
#

shh

inner jewel
#

it's only showing as a mention there because of User#toString()

slim heart
#

more work for him

#

dam

empty owl
#

couldnt I just use args?

earnest phoenix
#

there should be an example in each of docs assets

empty owl
#

instead of mentions

#

and do like if args = mention, do this

#

nvm this is so fking hard this concept

inner jewel
#

let [firstMember, secondMember] = mentions.users.first(2)

slim heart
#

ok can i just do this really dumb for you

empty owl
#

ok

slim heart
#

ok there

empty owl
#

um

slim heart
#

thats smaller

empty owl
#

yup

#

so its an array?

inner jewel
#

if count is defined it's an array

empty owl
#

ok

#

it still says undefined

#

wait

#

yup

slim heart
#
let [firstMember, secondMember] = mentions.users.first(2)
let user1 = client.users.get(firstMember.replace(/(<@|>)/, ""))
let user2 = client.users.get(secondMember.replace(/(<@|>)/, ""))```
inner jewel
#

wrong

slim heart
#

ik everyone who sees this will hate me

#

but it works

#

so shush

empty owl
#

ooooooooooooooof

inner jewel
#

that won't even work

earnest phoenix
#

MY FUCKING GOD

empty owl
#

couldnt I just use .username after first(2)

inner jewel
#
  1. they're User objects, not strings
  2. if they're undefined that code throws
#

no

earnest phoenix
#

IM AN IDIOT

inner jewel
#

first(2) returns an array

empty owl
#

works for first()

inner jewel
#

read the docs

empty owl
#

so not for first(2)

earnest phoenix
#

i just turned off the most importnat thing for a command handler.

slim heart
#

wups

inner jewel
#
Returns: * Array<*>
The single value if `count` is undefined, or an array of values of `count` length```
slim heart
#

yes

inner jewel
#

first() -> User?
first(1) -> [User?]
first(2) -> [User?, User?]

empty owl
#

oooohhhh

#

ok

inner jewel
#

which is why you can use destructuring for first(2)

empty owl
#

ok

#

like this? js let [firstMember, secondMember] = message.mentions.users.first(2) let numbers = Math.floor(Math.random() * 100) + 0 let loveEmbed = new Discord.RichEmbed() .setTitle(`The percentage of success!`) .setDescription(`${firstMember} has a ${numbers}% chance having a lasting relationship with ${secondMember} `) message.channel.send({embed: loveEmbed})

slim heart
#
 let a = message.mentions.users.first(2)
let user1 = client.users.get(a[0].toString().replace(/(<@|>)/, ""))
let user2 = client.users.get(a[1].toString().replace(/(<@|>)/, ""))```
#

here

#

lol

empty owl
#

spoon feeder!

slim heart
#

user1/2 are user objects

empty owl
#

but ill take it

slim heart
#

go do the rest

#

its really stupid

empty owl
#

whats a

inner jewel
#

no

slim heart
#

the array of mentions

inner jewel
#

that's still useless

slim heart
#

it works shutup natan

inner jewel
#

and it will still error

#

if there aren't two mentions

slim heart
#

really

inner jewel
#

you're literally doing client.users.get(user.id)

empty owl
#

wats a

slim heart
#

yeah thats the point

#

he wants the user object

inner jewel
#

which is a waste

#

you already have an user object

slim heart
#

a is the array of the mentions.first()

empty owl
#

ok

slim heart
#

no <@ q9u12398e1u2 > is a returned string no?

inner jewel
#

you're getting the user object, getting it's id, then getting the user object by id, when you already have the user object

slim heart
#

there is no user object

inner jewel
#

yes there is

slim heart
#

i dont think?

inner jewel
empty owl
#

errors

#
(node:2632) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined

at Object.module.exports.run (/app/cmds/lovecaculate.js:7:32)

at Client.bot.on (/app/index.js:39:28)

    at emitOne (events.js:116:13)

    at Client.emit (events.js:211:7)

    at MessageCreateHandler.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)

    at WebSocketPacketManager.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)

    at WebSocketConnection.onPacket (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)

    at WebSocketConnection.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)

    at WebSocket.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)

    at emitOne (events.js:116:13)

(node:2632) 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:2632) [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```
inner jewel
#

because you're calling .toString() on undefined

empty owl
#

mmmm

inner jewel
#

aka there aren't two mentions

empty owl
#
       let a = message.mentions.users.first(2)
let user1 = bot.users.get(a[0].toString().replace(/(<@|>)/, ""))
let user2 = bot.users.get(a[1].toString().replace(/(<@|>)/, ""))
      let numbers = Math.floor(Math.random() * 100) + 0
      let loveEmbed = new Discord.RichEmbed()
        .setTitle(`The percentage of success!`)
        .setDescription(`${user1} has a ${numbers}% chance having of a lasting relationship with ${user2} `)
      message.channel.send({embed: loveEmbed})```
#

take my code

inner jewel
#

get rid of the first 3 lines

slim heart
#

it still works lol

inner jewel
#

that's a worse way of doing let [user1, user2] = message.mentions.users.first(2)

#

no

slim heart
#

it literally does

#

its just a dumb way of doing it

inner jewel
#

if one of the elements of the array is undefined, aka not enough mentioned users, you get an error

slim heart
#

well no duh

inner jewel
#

it's
a) waste of cpu
b) error prone

slim heart
#

you gotta check for that but we arent doing that

inner jewel
#

with the destructuring approach you can handle them being undefined

slim heart
#

yeah killing the competition man dblWink

inner jewel
#

"killing the competition"

#

i can also mute you if that's how you're "helping"

west raptor
#

๐Ÿ‘€

slim heart
#

by getting rid of 0.00001% of the cpu GWfroggyAngryEyes

#

its a joke dam

#

gets threatened to be muted over a joke, says its a joke threatener leaves GWfroggyBlobWokeThink

brittle nova
#

oauth2 access tokens last 7 days right?

sick cloud
#

yeah

#

in which case you need to refresh, or expire it

brittle nova
#

should I not use cookies then if I want to refresh?

#

since cookies would have to expire

vernal basin
#

so for convenience, i wanted to not have to reopen my folders every time i want to update the new changes i made to my bot. so i made a 'crash' command, that can only be used by me. it is supposed to send a message and then crash the bot. so i tried 1) throw error. this basically just threw an error into console and then the bot kept working. 2) use an undefined variable or something else that makes the program not work. this doesn't send the message, even though the message is placed before the undefined variable

#

discord.js

#

is there a workaround?

high anchor
#

maybe you should just process.exit(2)

#

@vernal basin

vernal basin
#

owo i had no idea that existed

#

thank you

high anchor
#

no prob fam

vernal basin
#

(see i'm not used to js yet XD)

high anchor
#

just joined this server 10 seconds ago

#

yeah i feel you

vernal basin
#

XD. you're amazing ๐Ÿ˜„

high anchor
#

np

serene sun
#

hey, does anyone know how to lock a text channel to certain roles then open it for like 1 minute to allow them to type then close it again?

safe path
#

@serene sun thats a lot, what language?

serene sun
#

javascript @safe path

safe path
#

im out

serene sun
#

ive seen it done in another discord server

safe path
#

python in distance

serene sun
#

and im kinda a newbie to coding rip in chat

safe path
#

me too

vernal basin
#

it's just permission changing. if u search up a tutorial on how to make bots change permissions

#

but i have no idea. lol

serene sun
#

thank you for the suggestion though lmao

safe path
#

ive been having trouble making my bots 'playing' thing say how many servers its in

serene sun
vernal basin
#

maybe. i have no idea XD

#

im more of an algorithm person. i have no idea what all the fancy commands are in discord botland besides send message and read message. XD

serene sun
#

oh seems legit

earnest phoenix
#

Hello!

#

Basically im trying to make a bot that does this.

#

Its basically a reacting/tally bot.
So basically you have a sertain amount of time like 5 mins, to goto a channel called "3 letters", You type the last three letters and then you get put in the sections, so basically if 2 people said " 200" they would get put under the Id of "200" and 3 others said " 313 " they would get put under the Id of "313".

loud salmon
#

what part of this do you need help with?

#

also what language are you working with

earnest phoenix
#

I need help with programming the bot, and i cant develop just cause my mind cant handle it because i work different..

#

I just want to observe and be thought well doing it with someone.

#

Pretty much ghosting but tabbing in here and there.

loud salmon
#

we arent really developers-for-free here, if you want someone to do something well you need to talk to an admin and have them give you access to #434058442764714002

earnest phoenix
loud salmon
#

if you need help with programming, then by all means ask away

earnest phoenix
#

:/

#

i mean

#

I cant handle that stuff with programming tho, im just not good with it.

#

I dont know why.

#

My mind cant process it.

#

I guess.

loud salmon
#

they are public

#

its for transparency

high anchor
#

you could just do a setTimeout or use discordjs's built in timeout
as long as you maintain the scope you should just be able to set it to unlocked outside the timer and set it to locked inside the timer

west raptor
#

u get laughBoye from modlogs

loud salmon
#

yes

#

big laugh mmLol

earnest phoenix
#

Wait so @loud salmon What do i do for someone to come help me for the bot.

loud salmon
#

talk to a website admin and work out the specifics for a job offer to be posted in #434058442764714002

#

@earnest phoenix

earnest phoenix
#

Can i talk to you because you seem chill, and easy to work with or no.

loud salmon
#

and they have consulted people on multiple job offers

#

your best bet would be to talk to Ken#0666

#

its in the evening where he lives so you have a higher chance of a response

#

@earnest phoenix ^

high anchor
#

Bruh
i hate heroku

#

first i encounter their "dynamic dyno" system where it flushes local session stores...
so i workaround by connecting my API to firebase...
then the heroku worker self-terminates because the promise takes too long

earnest phoenix
#

@languid dragon

loud salmon
#

i meant dm him...

languid dragon
#

@fossil oxide not me

loud salmon
#

oh oof

#

nevermind

high anchor
#

does anyone else have an user count display like this

#

i need a better way to implement this
right now it is flooding audit logs

#

my workaround is to have it update when there is a display -> actual count difference of 10 users, but then it is not as cool cause it's way slower

#

what

elfin fulcrum
#

Hey, when adding a bot to the website, in the detailed description, how would you go about putting an iframe in? Would I just use <iframe src="https://website.com"></iframe>

bright spear
#

Yeah

elfin fulcrum
#

mk

keen drift
#

oo, my mongo driver supports uint64

amber junco
earnest phoenix
#

guys help me to implement music playback with c#

#

@sour pelican

#

yo

#

@modern sable

keen drift
#

why you randomly pinging people

coral trellis
#

Don't mention people for help

earnest phoenix
#

not for help

#

that bot is spamming

#

@coral trellis

keen drift
#

sc

coral trellis
#

Wdym the bot is spamming?

earnest phoenix
#

when i type messages

#

it sends messages to me

#

the paraprotection bot

#

wtf is that/

coral trellis
#

Send a screenshot

earnest phoenix
#

dms me

keen drift
#

@sour pelican

#

where

earnest phoenix
#

@sour pelican

#

h

keen drift
#

post some sc pepe

earnest phoenix
#

its not my business

#

it was just weird that it messaged only me

keen drift
#

fun

#

I'm wondering if I should make a white theme for dem dashboard

earnest phoenix
#

oof where can i find good info on how to get voice working on discord

earnest phoenix
#

i have this level system but every time the bot restarts the xp resets

let xpAdd = Math.floor(Math.random() * 7) + 10;
            let xp = require("./xp.json");

if (!xp[message.author.id]) {
    xp[message.author.id] = {
        xp: 0,
        level: 1
    };
}
let curxp = xp[message.author.id].xp;
let curlvl = xp[message.author.id].level;
let nxtLvl = xp[message.author.id].level * 300;
xp[message.author.id].xp = curxp + xpAdd;
  if (nxtLvl <= xp[message.author.id].xp) {
    xp[message.author.id].level = curlvl + 1;
    let lvlup = new Discord.RichEmbed()
        .setTitle("Level Up!")
        .addField("Congrats to", `${message.author}`)
        .setColor("#08ff00")
        .addField("New Level", curlvl + 1);
if(curlvl = 2){
  message.author.addRole("Level Test")
}
    message.channel.send(lvlup)

  fs.writeFile("./xp.json", JSON.stringify(xp), (err) => {
            if (err) console.log(err)
  });
  }
#

@earnest phoenix you need to have a place where you can save your xps

#

its very hard

#

to sovle such problems

keen drift
#

i can't even read that code

#

wtf is this indent

late hill
#

Use database thonkku

earnest phoenix
#

indent lmao

#

databases are hard

#

you also need a serv

late hill
#

Not that hard

#

You just have to get used to it

#

You don't need a special server

#

Theres free plans

earnest phoenix
#

oof theres so much things i ahve to elarn

#

learn

#

ikr

late hill
#

mlab gives you 500mb

#

Free

earnest phoenix
#

oof

lament meteor
#

so you rather have your data corrupt rather than learning

earnest phoenix
#

i mean storing in text files is really not useful

#

yes

late hill
#

text files ๐Ÿ‘€

keen drift
#

I'd go with local db if it's small scale purpose

earnest phoenix
#

i mean in fking text files

#

)

#

Text FILES

#

so...

#

soo...

#

use databases

#

i dont know how to use db properly

#

do research

#

i can not hep with that sorry

keen drift
#

there's plenty of wrappers

#

if anything there are plenty of json database

#

that will better ensure integrity than the way you are doing it atm

earnest phoenix
#

guys how playing sound works on discord why do i need additional software like ffmpeg

#

can i possibly do it without that

#

?

keen drift
#

for what

#

what lib are you using

#

what audio format

earnest phoenix
#

mp3

keen drift
#

are you streaming it

earnest phoenix
#

yes

keen drift
#

and what's the raw format?

earnest phoenix
#

opus

#

so wait basically discord only takes raw format?

#

i dont get it

keen drift
#

discord takes opus

#

opus, dual channel, and same rate of 48kHz

#

your lib doesn't have support for streaming audio?

earnest phoenix
#

so if i have a mp3 file i first need to convert it to raw then to discord

#

i am not sure

keen drift
#

if you have anything other than opus, than you need to transcode it to opus

earnest phoenix
#

oh god

keen drift
#

reference your discord lib for what it needs

earnest phoenix
#

the documentation is not really good tho

trim nexus
#

hi

keen drift
#

Yeah the lib supports AudioStream

earnest phoenix
#

ye im a bit unexperienced i have to do some research

#

never worked with audio

earnest phoenix
#

i am also using ubuntu

#

lmao

keen drift
#

C# on linux?

#

why not use other langs

earnest phoenix
#

lmao

#

i dont know other langs

#

XD

keen drift
#

welp shit

earnest phoenix
#

im stuck on c#

#

i am gonna swap to python probly soon

keen drift
#

you'll need to compile sodium and opus from source or install them from pkg manager

earnest phoenix
#

yup

#

the thing is i am also unexperienced with ubuntu too

#

lmao

keen drift
earnest phoenix
#

XD

#

but i managed to do that

keen drift
#

you prob off running this on windows

earnest phoenix
#

when i first developed the app i didnt even know how to run it

#

lmao

keen drift
#

n i c e

#

not exactly a good position for you

earnest phoenix
#

yup

keen drift
#

d.net got a support server tho

#

they prob have examples in there

earnest phoenix
#

oh wait wut

#

support server

#

???

keen drift
#

yeah

#

it's the Discord API guild

earnest phoenix
#

ohhh

safe path
#

d.py: i want to have my bot DM the user when they cant speak in a channel, how do i do it?

neat falcon
#

css: how to override !important;?

#

F

#

embeds broke

tight heath
#

!very-important

slender thistle
#

@safe path Voice or text channel?

restive silo
#

@keen drift C# works fine on linux

#

dw

#

.Net Core has good linux support

keen drift
#

yeah but you have to wine it right?

restive silo
#

no?

#

.Net Core is natively supported

#

since a long time already

keen drift
#

oh

restive silo
#

.Net Framework needs wine or Mono

keen drift
#

thought it outputs an exe

restive silo
#

you can output to .dll

#

and run it with the C# runtime on linux

keen drift
#

so do you need mono or wine to run it?

restive silo
#

no

keen drift
#

what format can it compile to?

restive silo
#

dll and exe and on Linux (atleast Ubuntu i dont know about other distros) Microsoft released a .Net Core runtime you can install via apt-get and run any .Net Core project eyesFlipped

keen drift
#

just like jvm similar?

restive silo
#

dunno

#

dont think so

keen drift
#

huh, but it's a runtime Thonkang

restive silo
#

i mean the C# compiler is also not completely compiled to computer code but its compiled on runtime in Microsofts own thing

#

i dont remmeber the name of that

#

its a runtime tho (i think)

#

ye boi

fierce thorn
#

If it works on debian it works on ubuntu if it works on ubuntu it works on any ubuntu fork

restive silo
#

debian & ubuntu aren't the only distros tho

fierce thorn
#

Most popular ones

keen drift
#

so it does goto assembly

#

alright

restive silo
#

ye

#

with .Net Core they made it possible to run without whine/mono on linux whats nice

keen drift
#

yeah it's interesting

restive silo
#

but they dropped a lot of good pre made libraries to interact with windows api ablobcatsipsweats

#

cause it does windows api calls what doesn't work on linux

safe path
#

@slender thistle text

slender thistle
#

<Member>.permissions_in(<Channel>).send_messages or something similar

#

<Member> being an instance of Member and <Channel> obviously being an instance of Channel

safe path
#

ok

earnest phoenix
fierce thorn
#

Hmmmmm

#

Discord is temporarily unavailable?

wispy schooner
fierce root
#

Anyone know anything about Redis Server or any other NoSQL databases. About how they could be hacked or information accessed from outside the local machine?

wispy schooner
#

@earnest phoenix why the fuck you pinging the tutorial writers?!

#

@queen sentinel @earnest phoenix pinged the tutorial writers for no reason

queen sentinel
#

goodness gracious

#

@earnest phoenix Don't just randomly ping a role like that

earnest phoenix
#

I need helo

#

Ok @queen sentinel

#

Help

fierce root
#

#wiktor9004 mean anything to anyone??

queen sentinel
#

I don't know, just wait for someone to give you an answer

fierce root
#

tick tock

tight heath
#

"cloudflare"

#

oof

fierce root
#

The following message was sent to everyone in my discord server before kick/banning them and deleting all my channels and information. I am very patiently trying to figure out two things. Is there any possible way to retrieve any of my data from the channels from discord? How can I prevent this from happening again? Can someon please direct me to the correct channel or server to discuss such matters. I was using a Python Pot and I used Redis (NoSQL) to store my discord key so the key was not visable in the code. The code was available on github. I need to find out what I did wrong with storing information in Redis. The message is quite large I will on ly post what I see as being important.

Helo! im wiktor#9004 and i just ddosed this bot and your server! :) Subscribe to my YouTube channel :D "then it has a youtube address" and come to my house "then it has a google maps address location"

keen drift
#

can you make sure you haven't leaked your token

#

eg pushed to github

#

and reset the token immediately

fierce root
#

I am. The only way it would have pushed to github is through the redis database which I will double check. But I keep that directory separate.

#

Is there any way someone could access information in a local redis server

keen drift
#

does your redis have authentication

#

it doesn't by default

fierce root
#

no it doesnt

keen drift
#

so it's open to everyone?

fierce root
#

anyone who would have access to my computer I suppose...but noone does

keen drift
#

and the port isn't exposed to the internet is it?

fierce root
#

nope

keen drift
#

does your bot contains any eval code

fierce root
#

like what exactly?

keen drift
#

any eval command

fierce root
#

no it shouldn't

#

No most definitely not

#

sorry...I'm not thinking straight...just woke up to this

#

but no I would never put that in my code

keen drift
#

can users input things?

fierce root
#

Yes...I have a database sest up for saving game information....the bot listens for a command then asks the user to type in something then it saves it in the selected column in PostgreSQL

#

I dunno...I'll have to look over the code...but is there any way to get back my data that was in all my channnels or is that gone for good?

keen drift
#

prob gone

fierce root
#

alright

keen drift
#

and judging from the grammar of that message

#

it's prob something simple

#

๐Ÿ˜›

fierce root
#

:) ha

#

I usually have very excellent grammar sir!

#

Thanks anyway for the suggestions.

safe path
#

@keen drift you developer for fishy bot?

brittle nova
#

he devs @coarse carbon

#

pretty sure

safe path
#

ah

hollow fulcrum
#
{'af': 'Afrikaans', 'am': 'Amharic', 'ar': 'Arabic', 'az': 'Azerbaijani', 'ba': 'Bashkir', 'be': 'Belarusian', 'bg': 'Bulgarian', 'bn': 'Bengali', 'bs': 'Bosnian', 'ca': 'Catalan', 'ceb': 'Cebuano', 'cs': 'Czech', 'cy': 'Welsh', 'da': 'Danish', 'de': 'German', 'el': 'Greek', 'en': 'English', 'eo': 'Esperanto', 'es': 'Spanish', 'et': 'Estonian', 'eu': 'Basque', 'fa': 'Persian', 'fi': 'Finnish', 'fr': 'French', 'ga': 'Irish', 'gd': 'Scottish Gaelic', 'gl': 'Galician', 'gu': 'Gujarati', 'he': 'Hebrew', 'hi': 'Hindi', 'hr': 'Croatian', 'ht': 'Haitian', 'hu': 'Hungarian', 'hy': 'Armenian', 'id': 'Indonesian', 'is': 'Icelandic', 'it': 'Italian', 'ja': 'Japanese', 'jv': 'Javanese', 'ka': 'Georgian', 'kk': 'Kazakh', 'km': 'Khmer', 'kn': 'Kannada', 'ko': 'Korean', 'ky': 'Kyrgyz', 'la': 'Latin', 'lb': 'Luxembourgish', 'lo': 'Lao', 'lt': 'Lithuanian', 'lv': 'Latvian', 'mg': 'Malagasy', 'mhr': 'Mari', 'mi': 'Maori', 'mk': 'Macedonian', 'ml': 'Malayalam', 'mn': 'Mongolian', 'mr': 'Marathi', 'mrj': 'Hill Mari', 'ms': 'Malay', 'mt': 'Maltese', 'my': 'Burmese', 'ne': 'Nepali', 'nl': 'Dutch', 'no': 'Norwegian', 'pa': 'Punjabi', 'pap': 'Papiamento', 'pl': 'Polish', 'pt': 'Portuguese', 'ro': 'Romanian', 'ru': 'Russian', 'si': 'Sinhalese', 'sk': 'Slovak', 'sl': 'Slovenian', 'sq': 'Albanian', 'sr': 'Serbian', 'su': 'Sundanese', 'sv': 'Swedish', 'sw': 'Swahili', 'ta': 'Tamil', 'te': 'Telugu', 'tg': 'Tajik', 'th': 'Thai', 'tl': 'Tagalog', 'tr': 'Turkish', 'tt': 'Tatar', 'udm': 'Udmurt', 'uk': 'Ukrainian', 'ur': 'Urdu', 'uz': 'Uzbek', 'vi': 'Vietnamese', 'xh': 'Xhosa', 'yi': 'Yiddish', 'zh': 'Chinese'}```
```py
for ling in infor:
                    linginfo = infor["ling"]
                    i = f"{i}\n{ling}:{linginfo}"```
#

I keep getting keyError in infor[ling]

slender thistle
#

ling is a vaaaar

#

not aaa strriiiiing

hollow fulcrum
#

oh

#

๐Ÿคฆ

safe path
#
    print("yo")```
slender thistle
#

And name your variables properly, will you?

hollow fulcrum
#

I can't be arsed

slender thistle
#

Gl reading your code in a month or two :^)

brittle nova
#

If I have something like:
<input name="test" type="text"> it would post
{ test: "some content" }
How can I make a bunch of inputs post together and have the result be something like:
{ test: "some content", test2: [{something}, {somethingelse}] }

earnest phoenix
#

use a form

#

with a submit button to submit multiple inputs

brittle nova
#

not what I'm asking though

#

I want to group specific inputs in a form together so they are posted under the same property

earnest phoenix
#

you could use the form to submit them to a page which will combine them and then post it to wherever you need it to go

keen drift
#

@safe path what's fishy bot

safe path
#

nvm then

#

nvm then

pastel mulch
#

what goes above this to make it work

#

I just lost everything

vivid flax
#

Just a question, for some reason, my bot's status on the site shows as ???, I don't really care that much, I would just like to know why it happens.

tight heath
#

because it probably has been kicked from here

west raptor
#

^

vivid flax
#

For what?

tight heath
#

search the name of your bot

formal agate
#

Code:

    if(message.author.id === "280815367662731266") {
        message.channel.send("yeet");
    } else
    message.channel.send("setting the bots prefix currently not allowed.");
}```
west raptor
#

nani

tight heath
#

line 1

#

third to last

#

= {

#

should be

#

=> {

formal agate
#

.

west raptor
#

oh

#

yes

formal agate
#

works now

#

thank you

tight heath
#

yw

#

arrow functions ftw

formal agate
#

lol

#

now i need my improved command handler to work lol

tight heath
#

hahayes or use aurora

west raptor
#

whats that

tight heath
#

my indev framework lmao

west raptor
tight heath
#

which only requires commands yet and saves to client in a Collection so not working lmao

#

but

#

I'm at the command handler

#

which is gonna support

#

flags

west raptor
#

noice

tight heath
#

a usage string

#

like

#

and automatically check the arguments for validity, aswell as parsing them

#

๐Ÿ˜‹

#

and pass that into the command

#

and into help, just !ban <user> [duration] [reason] gets sent

west raptor
#

oh

#

i think klasa does that

#

cool

tight heath
#

yes klasa does

#

but klasa is meh

#

updates are inconsistent and all breaking

#

the dev team is just rude as heck

west raptor
#

oof

#

i used to use klasa

#

im working on my own framework now

tight heath
#

I've been active in the diri server for about half a year; there's a reason I left lmao

#

same

#

let's both do one!!

#

lmao

west raptor
#

lol

tight heath
#

you're the third one actually

west raptor
#

ive been working on it for a while now

tight heath
#

a friend of mine, stitch, had exactly the same story

#

:p

west raptor
#

ah

tight heath
#

you might know him

west raptor
#

yea i do

tight heath
#

diri shitted on him a lot

#

I met him actually because they did and I started to question it

west raptor
#

didnt talk to them much though i think i talked like once

#

but i have seen them around in other servers

tight heath
#

he deleted his account a while ago.

#

too much drama

west raptor
#

oh dang

tight heath
#

yeah

#

I'd like to hear about your framework ๐Ÿ˜‹

vivid flax
#

@tight heath Ok really can't find it lmao, the search bar comes up empty, so I'm not entirely sure what's going on ๐Ÿ˜–

tight heath
#

can you send your bots ID

vivid flax
#

488395833331548161

#

sends token

rigid crane
#

Can I execute the channel of what my bot in the guild

#

And example

#

My bot join a server

#

And if I create a channel name bot-info

earnest phoenix
#

What does not go quick.db

vivid flax
#

What?

rigid crane
#

Then it will send message to the channel

#

How to do this?

vivid flax
#

Google?

rigid crane
#

I can't found the tutorial about this

vivid flax
#

I wouldn't do that anyway, it's not exactly something people like to happen when they invite a bot, and most people won't give your bot perms to do that anyway

rigid crane
#

But it just sending a message

west raptor
#

just send it to the default channel?

#

lol

rigid crane
#

Yes

#

The name of the channel is "info"

west raptor
#

what

vivid flax
#

...

tight heath
#

@vivid flax could it be your bot is not approved yet

rigid crane
#

I know how to code but I dont know how the execute the name of channel

vivid flax
rigid crane
#

But I don't know which one is my need

vivid flax
#

Probably guild#channel

rigid crane
#

guild.channel?

vivid flax
#

nvm

quartz kindle
#

you want to create a channel or send a message to an existing channel?

vivid flax
rigid crane
#

Yes

#

Wwait

#

No I want to make a bot-info system

#

If I create a channel name "bot-info" and my bot will automatically send the info in it

vivid flax
#

Like we said, just send it to the default channel that the invite leads to, there is no need to make a new channel (and most people won't give your bot perms for it)

quartz kindle
#

bot-info in your server, or create a bot-info in the server your bot joins?

rigid crane
#

bot-info in my server

quartz kindle
#

then use client.channels.get(yourchannelid)

tight heath
#

client.channels.get('id of your bot-info channel').send()

rigid crane
#

But in different channel

vivid flax
#

Okay that is not how he explained it earlier, why didn't you just say that?

tight heath
#

cuz not native

rigid crane
#

I just want the name bot-info and send

quartz kindle
#

just get the id of the bot-info channel

rigid crane
#

If I have 2 group

#

And the first one have the bot-info

#

And the second too

#

And if I run it

#

It will send the info to this 2 message channel

quartz kindle
#

you can get the id of both channels

#

if they are not going to change

rigid crane
#

And if I have 10 group?

#

I want to detect the name, not the id

quartz kindle
#

then use find

#

client.channels.find(channel => channel.name === "bot-info")

rigid crane
#

Ohhhhhh

quartz kindle
#

but find is slower than get, thats why its always better to use get if you can

rigid crane
#

So it will find the bot-info in what server my bot in?

quartz kindle
#

it will find the first one of all servers

#

i think maybe its better to use filter, wait

tight heath
#

same thing just replace find with filter

rigid crane
#

I am sorry for my poor English :p

quartz kindle
#

yeah its better to use filter, find only finds 1 item

rigid crane
#

Okkay

#
client.channels.filter(channel => channel.name === "bot-info") ```
Like this one?
quartz kindle
#

yeah that should work

#

then you have to use forEach

#

and send to each of them separately

tight heath
#

(or .each if you're using master)

quartz kindle
#

ah good to know

#

for whenever i remake my bot

tight heath
#

:)

#

wait is it in plain d.js or what

quartz kindle
#

yeah v11

tight heath
#

oof

rigid crane
#

@hard hollow is my bot .w.

tight heath
#

cute avatar

quartz kindle
#

not even v11.4

#

11.2 i think

#

lmao

tight heath
#

lmao update?

#

I don't think there were any breaking changes between .2 and .4

quartz kindle
#

im working on too many things at once lmao

tight heath
#

since they use semver

quartz kindle
#

im gonna remake it with v12 and use my api instead of internal code

tight heath
#

fair but why not just bump dep from 11.2 to 11.4

quartz kindle
#

it will be like half the lines of code or less

rigid crane
#

paint by my friend

quartz kindle
#

im just lazy to upgrade

#

the same reason my vps is running ubuntu 16

#

xD

tight heath
#

ooof

#

mine is running 18.04 iirc

quartz kindle
#

idk why but i wait for the right moment to upgrade everything at once

#

shitty habit i guess

west raptor
#

thonk

quartz kindle
#

maybe windows update trauma

tight heath
#

tfw use sudo even when logged in as root

west raptor
#

why

#

lol

#

also why login as root

tight heath
#
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nginx : Conflicts: nginx-common but 1.14.0-0ubuntu1.2 is to be installed
E: Broken packages

@quartz kindle wtf lmao

quartz kindle
#

lmao

safe path
#

Im using the python server count example and im getting a name error: bot is not defined. How do i fix?

west raptor
#

uh

#

whats

#

<thing>.Bot()

#

defined as

safe path
#

hmm... i dont have .Bot() in my code (ctrl+f)

west raptor
#

.Client()?

safe path
#

client = discord.Client()

west raptor
#

replace bot with

#

client then

#

lol

safe path
#

ok

tight heath
#

okay so apt purge nginx nginx-common fixed

#

weird

safe path
#
'NoneType' object has no attribute 'id'
  File "C:\Users\avr\Desktop\DiscordBot-Subway\main.py", line 165, in <module>
    url = "https://discordbots.org/api/bots/" + client.user.id + "/stats"```
slender thistle
#

uhhhhhhh

#

await client.wait_until_ready() first

#

And please do it under on_ready event

safe path
#

i dont have a client.wait_until_ready

#

still 'NoneType' object has no attribute 'id'

slender thistle
#

what

#

Wdym you don't have it

formal agate
#

In Discord.js: So my help command is broken, but idk how to fix it. I think i know what is wrong but as I have said before idk how to fix.

    fs.readdir("./commands/", (err, files) => {
        if (err) return console.error(err);
        files.forEach(file => {
            if (!file.endsWith(".js")) return;
            let props = require(\`./commands/${file}\`);
            
            let commandName = props.help.name;
            let description = props.help.description;
            let usage = props.help.usage
            
            if (!message.channel.type == "dm") {
                message.author.send(\`**Commands** \n ${commandName}\`);
            } else
            message.channel.send("๐Ÿ“ฅ | Check your dm now.");
        });
    });
}```

The error is:
```module.js:550
    throw err;
    ^

Error: Cannot find module './commands/emoji.js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at files.forEach.file (E:\STUFF\commands\help.js:9:16)
    at Array.forEach (<anonymous>)
    at fs.readdir (E:\STUFF\commands\help.js:7:9)
    at FSReqWrap.oncomplete (fs.js:135:15)```
safe path
#

@slender thistle i search the file for that and theres nothing, thats what i mean

slender thistle
#

What file

safe path
#

my code

slender thistle
#

I mean, add it

#

do you literally just define url right afer declaring discord.Client()

safe path
#

well i put all the code for it torwards the bottom, after the message settings but before the async def on_ready():

slender thistle
#

before?

safe path
#

vscode says id: NoneType

#

url = "https://discordbots.org/api/bots/" + client.user.id + "/stats"

haughty jewel
#

wuh are you using ts

safe path
#

timestamp?

ornate shadow
#

I'm trying to figure how you can add a blank embed line

#

I think it has something to do with embed.Empty but not sure

safe path
#

embed.add_field(name="", value="", inline=False)

west raptor
#

ts

#

is

#

typescript

ornate shadow
#

I tried it

#

discord.errors.HTTPException: BAD REQUEST (status code: 400)

#

I've tried adding a \n before the name of a field and no results

safe path
#

yep i have no clue what typescript is

tight heath
#

TypeScript is JavaScript but with type definitions

earnest phoenix
#

python

#

Quick.db dont install

slender thistle
#

@ornate shadow \u200b in string

#

@safe path Because your bot doesn't get to load the user object of itself before being used

formal agate
#

Iโ€™m gonna repost because this was pretty much ignored

In Discord.js: So my help command is broken, but idk how to fix it. I think i know what is wrong but as I have said before idk how to fix.

    fs.readdir("./commands/", (err, files) => {
        if (err) return console.error(err);
        files.forEach(file => {
            if (!file.endsWith(".js")) return;
            let props = require(\`./commands/${file}\`);
            
            let commandName = props.help.name;
            let description = props.help.description;
            let usage = props.help.usage
            
            if (!message.channel.type == "dm") {
                message.author.send(\`**Commands** \n ${commandName}\`);
            } else
            message.channel.send("๐Ÿ“ฅ | Check your dm now.");
        });
    });
}```
#

The error is:

    throw err;
    ^

Error: Cannot find module './commands/emoji.js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at files.forEach.file (E:\STUFF\commands\help.js:9:16)
    at Array.forEach (<anonymous>)
    at fs.readdir (E:\STUFF\commands\help.js:7:9)
    at FSReqWrap.oncomplete (fs.js:135:15)```
mossy vine
#

@formal agate did you even read the error? emoji.js doesnt exist in the commands directory

formal agate
#

I did, but I didnโ€™t notice that

#

Thank you

valid frigate
#

i'm about to customize my bot's dbl page, how would i change the background?

#

what css properties should i be looking for*

quartz kindle
#

right click > inspect element

valid frigate
#

ik, i found .wrapper-page but it looks kinda wonky mmLol

#

not sure if that's the correct element

quartz kindle
#

apply css to it in the inspector itself and test the results live

hallow prairie
#

If I want to host my bot at multiple servers I just need to use sharding?

keen drift
#

yeah

valid frigate
#

dammit i forgot about the inspector mmLol

#

i just forgot how to use it so i havent been using it

quartz kindle
#

i code websites live using the inspector lmao

hallow prairie
#

And will it automatically connect to the server with the lowest ping

quartz kindle
#

i dont think it will

hallow prairie
#

It will just random pick one right?

quartz kindle
#

if you use sharding, you can split guilds into multiple processes, and you could run each process in different machines

#

so each machine will handle a predefined group of guilds, chosen by the discord api i believe

valid frigate
#

internal sharding came out as well meaning you don't have to spawn multiple clients

#

(on d.js)

quartz kindle
#

yeah but without multiple clients you cant run on multiple machines

inner jewel
#

no

quartz kindle
#

if you run internal sharding on 2 machines, your entire bot will be duplicated

hallow prairie
#

I use eris