#development

1 messages ยท Page 549 of 1

amber fractal
#

No

keen drift
#

well, have fun

amber fractal
#

Its 2:19 am

earnest phoenix
#

what

amber fractal
#

Hit the windows key

#

Search cmd and right click

earnest phoenix
#

ok

amber fractal
#

Should say run as admin

#

Or something like that

keen drift
#

don't you think people should at least know how to use the computer before attempting to code

#

lmao

amber fractal
#

He told me he knows js

keen drift
#

wow

#

๐Ÿ‘๐Ÿพ

amber fractal
#

So ill trust him

keen drift
#

how's that going for ya

amber fractal
#

Well...

#

Slow

keen drift
#

kek

earnest phoenix
#

i cant find it

keen drift
#

@amber fractal lmao, good night

amber fractal
#

Gn

#

Hit the windows key and r

#

Type cmf

#

Cmd

#

type cmd not cmf

keen drift
#

inb4 he's not on windows

earnest phoenix
#

I AM

#

ON WINDOWS 8

keen drift
#

wew

#

@amber fractal yeah idk about this

amber fractal
#

Windows key and r

#

Same time

earnest phoenix
#

WHATS THE COMMAND

amber fractal
#

cmd

keen drift
earnest phoenix
#

OK

keen drift
#

i'd just link him a video

#

that's a lot to even remotely to teach

earnest phoenix
#

ok it says

#

microsoft 2013 reservd

#

@amber fractal

#

like that

keen drift
#

was w8 that long ago, jeez time flies

earnest phoenix
#

yes

amber fractal
#

Are you in command prompt atleast

earnest phoenix
#

yes

amber fractal
#

type node -v

earnest phoenix
keen drift
#

hue

earnest phoenix
#

it just closes

amber fractal
#

Type cmd into run

#

Thats not command prompt

earnest phoenix
#

windows key and r opens run

amber fractal
#

Yes

#

Typing cmd in there opens command prompt

earnest phoenix
#

it opens

amber fractal
#

Now type node -v

earnest phoenix
#

ok

#

and press enter ???

amber fractal
#

Yes

earnest phoenix
#

can i dm you the picture

amber fractal
#

Sure

keen drift
earnest phoenix
earnest jacinth
#

ฤฐ want role

#

๐Ÿ™

sick cloud
#

my api generates a buffer, how do i turn that into an image?

keen drift
#

Set the proper content type

wide ruin
#

so on vsc, ive got all the code sorted,

#

but it keeps turning off

#

how can i stop that?

trail dew
#

I didn't see this as an issue on the GitHub, but is it a known issue that the "Remind me to Vote for this bot" button does nothing?

#

Doesn't seem to be a support channel for the webpage itself; this seems to be the closest thing

sick cloud
#

@trail dew it works

trail dew
#

Myself and at least one other person on our server were discussing how we've never received a single reminder

sick cloud
#

probably your os or browser

#

it works fine on Firefox for me

trail dew
#

How is the notification supposed to be sent? Over discord, or via browser?

sick cloud
#

browser ofc

trail dew
#

Ohhh. Then yeah, it's a browser issue. It didn't say at all how the reminder was going to be sent; we were all assuming some bot would message us

sick cloud
#

yeah it doesn't work on my PC

#

but it does on mobile

#

nothing DBL can fix though

trail dew
#

I mostly discord on ios mobile, so I guess the feature just won't work for me

sick cloud
#

safari?

trail dew
#

At least now I know

#

Yeah

#

iOS 12 Safari

sick cloud
#

this is what i get

#

if you allow them they work

trail dew
#

Yeah, I haven't had that pop up on Safari. I don't think mobile safari supports browser notifications.

sick cloud
#

iOS entirely sucks though so we expect it uggh

trail dew
#

Weird that a discord service doesn't notify via discord, but such is life. At least it's not a bug

sick cloud
#

they can't reliably use discord

#

not everyone is in this server, and not everyone has DMs open

trail dew
#

Well, thank you for clarifying how they're supposed to work

bitter sundial
#

yeah safari has no support for that

rocky dagger
#

I am using discord.js and why dont this work? let botembed = new Discord.RichEmbed(); .setDescription("Bot Information"); .setColor("#cc1212"); .addField("Bot Name", bot.user.username);

#

ping me

keen drift
#

Cause you terminated RichEmbed() with semi colon

rocky dagger
#

lol

#

I am new, its my first bot

bright spear
#

You don't need semicolons in js

#

If you're gonna use them then only put them where they should be

rocky dagger
#

ok

#

I thot you needed it

#

in js

keen drift
#

It doesn't enforce it

rocky dagger
#

ok

earnest phoenix
#

How to make the bot was online in monitoring?

mossy vine
#

can anyone help with es6?
vsc reccommended me to import modules this way, but this happens

#

even if i ignore the {} it still happens with a different error message

#

as SyntaxError: Unexpected identifier

languid dragon
#

wats ur node -v

mossy vine
#

v10.14.2

languid dragon
#

wouldn't it be { Client }

mossy vine
#

no im importing Discord

#

and tried with {}

#

idk why i linked the hungarian site

languid dragon
#

so even when you do ```JS
import Discord from 'discord.js';

mossy vine
#

yup, SyntaxError: Unexpected identifier

languid dragon
#

sec

#

its definitely v10?

mossy vine
#

yes, i just sent the node -v output

smoky mica
#

i think its

#

import Discord from ('discord.js')

#

not sure lmao

languid dragon
#

it is not

mossy vine
#

docs say otherwise

languid dragon
#

what else is in your environment

mossy vine
#

wdym

languid dragon
#

so you have index.js

#

is there any other code in index.js

mossy vine
#

defining the client, logging in, and the ready event logging "im online lmao"

languid dragon
#

send pic

mossy vine
languid dragon
#

ok 1 sec sir

#

ok i think i know the issue uwu

mossy vine
#

yes the issue is that its not working D:

languid dragon
#

no 1 sec

#

okay

#

rename your file to index.mjs
and run it with node --experimental-modules index.mjs

#

:^)

#

as far as I know, import only natively works for code that's going to compile

mossy vine
#

but then everyone else using the code will need to do that, no?

languid dragon
#

so like, React for example, compiles into code that is then read by the browser
(not really "compiled" just converted into legible and organised code that a computer can understand but we can not)

#

yes

mossy vine
#

mk so i guess i will stay with require() lmao

languid dragon
#

@mossy vine use coffeescript :^)

mossy vine
#

ok

#

does it compile to js like typescript?

#

or does it just execute

languid dragon
#

yes

mossy vine
#

ew no

languid dragon
mossy vine
#

oh that syntax is hot

languid dragon
#

you don't even have to look at index.js, just the coffeescript stuff
it's great

mossy vine
#

hm

thorn nexus
#

Hello everyone, I need your help. I have a .json file in which the level of participants is recorded.

  "guild.id": {
        "user": {
              "user.id": {
                    "level": 8
                  }
        }
    }
}```
How can I get the list of participants with the highest level?
mossy vine
#

sort through them

#

simple for loop

languid dragon
#

are you using JSON as a database?

mossy vine
#

or forEach since its an object

thorn nexus
#

But it is possible in more detail how to do this. is there an example?

#

@languid dragon something is wrong?

languid dragon
#

is that a yes to my question?

mossy vine
#

you shouldnt use json files as a database

thorn nexus
#

just other formats fail to use ๐Ÿ˜…

covert turtleBOT
#

wow @mossy vine you leveled up XDDDD /s

mossy vine
#

what

languid dragon
amber fractal
thorn nexus
#

I'm still too stupid. If you offer another way, I will try to do

mossy vine
#

why did i get pinged in #commands and then your weebot sent a message here

amber fractal
#

I use json, want to switch to enmap or sqlite or something but its just so much revamping :(

earnest phoenix
#

lmao steven

thorn nexus
#

it seems to me that everything is not bad with json. I just do not know other options for storing information

languid dragon
#

MongoDB

#

MySQL

#

RethinkDB is good for beginners

amber fractal
#

I want to do it sooner rather than later because theres already a lot of data I'd need to transfer

thorn nexus
#

what's best for frequent writing and reading

mossy vine
#

@languid dragon ok coffeescript seems pretty fucking hot lol

languid dragon
knotty steeple
#

more people using coffeescript dab

thorn nexus
knotty steeple
#

also u

#

pls dont use json as a database

thorn nexus
#

I'm too stupid to use anything else

knotty steeple
#

well be less stupid

thorn nexus
#

๐Ÿ˜‚

#

the question is still valid. how to get 10 users with maximum level with .json 497

mossy vine
#

the answer is still valid, loop through the members

thorn nexus
#

I understand, I do not understand how to do it

knotty steeple
#

are u using fs

thorn nexus
knotty steeple
#

what

mossy vine
#

well

#

load the file with require()

#

and with a for loop or forEach() you look thourgh all of the data

knotty steeple
#

pls use for

mossy vine
#

and if its higher than the previous highest encountered level, make it the new highest encountered level

knotty steeple
#

forEach is slow af

thorn nexus
#

complicated NoLike

knotty steeple
#

what is

tulip ledge
#

Anyone knows how I make a setInterval promise I used to know but forgot

knotty steeple
#

if loops are complicated you have to learn more js

topaz fjord
#

Use go

#

U dum dum

knotty steeple
#

go away

waxen quest
#

Guys ,how do I get a user's creation date? I've looked at the docs and all that but it still doesn't seem to be working. (nodejs)

languid dragon
#

Discord.JS?

waxen quest
#

yes

languid dragon
fierce owl
#

or you can change message.author to anyone

waxen quest
languid dragon
#

read

#

message.user isn't a property also

fierce owl
#

boi message.user is not a property

languid dragon
waxen quest
#

oh right thanks

languid dragon
earnest phoenix
#

sh

languid dragon
#

stop spoonfeeding

fierce owl
#

How do you make a leveing system, I need help plz

earnest phoenix
#

Theres no such thing

topaz fjord
#

Wut

fierce owl
#

ranking system

earnest phoenix
#

Thats never been done before

#

what is it

fierce owl
#

mee6 leveling

#

that is what is is

#

*it

earnest phoenix
#

what is a mee6

languid dragon
#

@earnest phoenix please stop being a nuisance

fierce owl
#

...

earnest phoenix
#

lmfao snowy

#

alright

topaz fjord
#

You'll need to calculate an amount of xp to give a user per message and add it to their total xp count. If that xp reaches a certain number add 1 to their level

#

ez

fierce owl
#

yeah but how, i am noob

topaz fjord
#

I'm not gonna give you code

languid dragon
#

read documentation, learn to code

fierce owl
#

i hjave

languid dragon
#

view these PDF files for best practices and common sense with javascript coding

waxen quest
#

Thanks, got it to work peepo_ThumbsUp

mossy vine
#

okay so in js there are these things that look like
client.on('something', callback)
client is a class right? and what is .on() and how would implementing one go?

#

sorry if this is spoonfeeding, if anyone can direct me to some resources i would be thankful

languid dragon
#

ok no

#

client is a new Discord.Client

mossy vine
#

yes and i meant that Client is an class

#

right?

#

and lowercase client is the thing

#

the whatsitcalled

languid dragon
#

it's a created instance of Client

mossy vine
#

yes thats what i meant

languid dragon
#

yes

mossy vine
#

then what is .on() and how would it be implemented?

#

class documentations dont tell aynthing

languid dragon
#

.on is an event handler

#

essentially its like this

#
client.on("message", function () {
    // because a callback is a function
});

// translate to

on a "message" event from client, do function

#

does that make sense?

mossy vine
#

yes

#

so how would i implement one in my own non client related code

languid dragon
#

what

#

oh i see

#

so you want to make your own event emitter ?

mossy vine
#

basically yes

#

for a different class

#

not Client

languid dragon
#
const EventEmitter = require('events');

class MyEmitter extends EventEmitter {}

const myEmitter = new MyEmitter();
myEmitter.on('event', () => {
  console.log('an event occurred!');
});
myEmitter.emit('event');
mossy vine
#

ok so i need to require the events module/package/idontevencare to make it work and then i just .on() and .emit()?

languid dragon
#

its a part of node.js so you don't need to install it

mossy vine
#

and for MyEmitter class i can add more things right?

languid dragon
#

yes

mossy vine
#

so it behaves like a normal class with those features?

languid dragon
#

an example usage of this would be


const EventEmitter = require('events');

class Game extends EventEmitter {

    constructor() {
        // do stuff
        this.ready();
    }

    ready() {
        this.emit("ready");
    }

    start() {
        // do more stuff
    }

}

const game = new Game();

game.on("ready", () => {
    console.log("the game is ready!");
    game.start();
});
#

its untested so i dont know if it will actually work

mossy vine
#

alright thank you for helping

serene sun
#

hey everyone, would there be a way to create a command that responds with how many people are in a certain call?

amber fractal
#

What lib?

mossy vine
#

yes, read the docs

slim heart
#
  const args = message.content.slice((`<@${client.user.id}> `).length).trim().split(/ +/g);
  const command = args.shift().toLowerCase();```
is there something wrong with this? because every now and then when i say a normal sentence it'll response as if i said the <@clientid>
slim heart
#

anyone?

mossy vine
#

can you send your full message event?

slim heart
#

its a one file bot so idk

mossy vine
#

whatever is in your client.on('message'...

#

send the entire thing

slim heart
#

yes thats what im saying

mossy vine
#

yes, only send the part in the message event

slim heart
#

all 800 lines?

mossy vine
#

okay then only the first few lines of it lmao

slim heart
#

xD

#
client.on('message', async (message) => {
    if(message.guild && !message.guild.me.hasPermission("SEND_MESSAGES")) return;
  if(message.author.bot) return;
  const args = message.content.slice((`<@${client.user.id}> `).length).trim().split(/ +/g);
  const command = args.shift().toLowerCase();
mossy vine
#

yeah, you need to check if the message starts with your bots prefix

slim heart
#

this is the only part before the if(command =="")

#

yes

#

omg

#

i feel dumb

#

sorry

mossy vine
#

its ok lol

earnest phoenix
#

I have a problem with my startscript (Debian 8)

#

nodejs /root/DiscordBot/LSGangwars/bot.js

#

but how can I create a screen

sick cloud
#

screen -s or something? depends

#

i only remember how to do it for centos

earnest phoenix
#

I want who I Putty out that he does not go with

vagrant flare
#

is it necessary to put a catch for every send() method?

earnest phoenix
#

can someone help me with my screen problem?

sick cloud
#

@vagrant flare not really

earnest phoenix
#

@earnest phoenix have you tried using an amazing thing called google

#

yeah. i know but i doesent find it

#

๐Ÿ˜ฆ

#

its literally the first result what

#

i search and search

#

but nothing

#

-.-

#

pls say

fierce owl
#

how do you make an eval command
Example Me: ?eval (code)
Bot: Running eval...
Also bot: js Code

sick cloud
#

what library

fierce owl
#

d.js

sick cloud
#
const code = args.join(' '); // assuming you have args, which you should
const result = eval(code);

msg.channel.send(`\`\`\`js\n${result}\`\`\``);

change it as needed and add owner only protection

#

thats kinda what you gotta do

fierce owl
#

ok thanks

earnest phoenix
#

I have a problem with my startscript (Debian 8)
nodejs /root/DiscordBot/LSGangwars/bot.js
but how can I create a screen

dense ocean
#

how i can overwrite permissions and create channel

idle mountain
#

what language and library?

dense ocean
#

js and discord.js

#

i want everyone role don't see text channel and don't message

bright spear
#

@dense ocean what d.js version

dense ocean
#

"discord.js": "^11.4.2",

dense ocean
#

Okey, thx โค

bright spear
#

yw

bleak cradle
#

@deep drift

celest arch
#

Would any of you recommend Heroku?

#

I know about the list in the pins

#

But I feel Heroku is the best option for me to go with rn. ANyone have any input?

inner jewel
#

heroku/glitch aren't suited for discord bots

celest arch
#

My bot is so small right now

#

I think it will be able to support it

inner jewel
#

both kill your process after a time of inactivity

bright spear
#

idk if heroku officially supports discord bots

#

but glitch does

celest arch
#

Im just looking for a cheap reliable host

inner jewel
earnest phoenix
#

glitch is free

inner jewel
#

this doesn't look like supporting discord bots

#

which require a constant ws connection to discord

celest arch
#

Im hosting off of my PC right now

earnest phoenix
#

have your bot like send stuff to the console every 4 minutes or something

#

keep it live

inner jewel
#

sending to console won't

#

you can have it do a request to itself

earnest phoenix
#

ew

inner jewel
#

but that's just a loophole

celest arch
#

So what host would you guys recommend from the pinned list

#

I was thinking maybe Digital OCean

earnest phoenix
#

I mean

#

I know a host that has really cheap hosting

#

compared to those

#

if you want info dm me. I use their services

zealous veldt
#

I recommend GalaxyGate over digital ocean

#

cheaper

#

and they have a support server on discord which they're very active in

#

also very transparent, and you get really low ping to the discord api

keen drift
#

lately I have been deciding to whether or not to go with digitalocean for their kubernetes

zealous veldt
#

Weren't able to host it yourself?

keen drift
#

able, yes, easily, no

zealous veldt
#

oof

#

that sucks

vocal meteor
#

is this code ok because it adds Member role to bots

#

not bot role

bright spear
#

@vocal meteor what lib and version

vocal meteor
#

11.4.2

#

Discord.js

bright spear
#

no bot property

vocal meteor
#

hmm ok let me check

bright spear
#

so

#

member.bot isnt a thing

vocal meteor
#

oh it's member.user.bot

#
client.on('guildMemberAdd', async member => {
    let autoRole = await db.fetch(`autorole_${member.guild.id}`).catch(err => console.log(err));
    if(!autoRole) return;
     if (!member.guild.roles.get(autoRole)) return;
     let botRole = member.guild.roles.find(r => r.name === 'Bots');
     if(!botRole) return;
     if(!member.guild.roles.get(botRole.id)) return;
     if (member.user.bot) {
         member.user.addRole(botRole);
         } else {
         member.addRole(autoRole);
         }
});
#

is my code correct now @bright spear

bright spear
#

no..

#

its not member.user.addRole

#

just member.addRole

vocal meteor
#

ok

bright spear
#

cuz ur adding a role to the member

#

not the user

vocal meteor
#

Yes, GuildMember

#

Thanks

mossy yacht
#

OK so I have a problem that I can't fix and I need some help

#

I can't send the file because I'm not home but the problem is that there is an error in line 29
the program only has 28 lines

#

Help

mental solstice
#

we cant help if we can't see it

mossy yacht
#

I have it copied hold on

#

It makes me mad

#

Or maybe its just being dumb

#

Idk

mental solstice
#

I see 3 { and 4 }

mossy yacht
#

Oh

#

Im an idiot

mental solstice
#

no worries.. I didnt learn to count that high until kindergarten

#

๐Ÿ˜‚ jk.. happens to the best of us

mossy yacht
#

lol

earnest phoenix
#

@keen drift how to get reaction-role

#

???

#

bot

knotty steeple
#

wrong channel

earnest phoenix
#

Not sure if I can ask here, but I have a var that looks like this

  {
    "pic":"https://cdn.astrobin.com/thumbs/gGoN6WUmE0Km_1824x0_wmhqkGbg.jpg",
    "source":"Adam Jesionkiewicz"
  },
  {
    "pic":"https://cdn.astrobin.com/thumbs/v8e_ybM2kUN9_1824x0_wmhqkGbg.jpg",
    "source":"Rafael Schmall"
  },
  {
    "pic":"https://cdn.astrobin.com/thumbs/4f1dGIOHdGt1_16536x16536_u7lfpV8j.png",
    "source":"Ola Skarpen"
  },
  {
      "pic":"https://cdn.astrobin.com/thumbs/k8RFxxn2duuh_1824x0_E5OUiQ7u.jpg",
      "source":"Kevin Morefield"
  },
  {
    "pic":"https://cdn.astrobin.com/thumbs/jtUTwFWuU0S1_1824x0_wmhqkGbg.jpg",
    "source":"sydney"
}
]```
and I wanted to just console.log all the sources so they look like this: ``Adam Jesionkiewicz Rafael Schmall Ola Skarpen`` etc. Would anyone know how to do this in js?  ๐Ÿ˜จ
quartz kindle
#

loop over pics (for or for of or .forEach) and console.log the item source

#

example ```js
var array1 = ['a', 'b', 'c'];

array1.forEach(function(element) {
console.log(element);
});```

earnest phoenix
#

AAAA thank you soooo much!!!

next scaffold
#

Hi

#

pls unmute my bot

#

414440610418786314 (id because when you mention my bot it shows help msg)

#

I fixed problem where it responds to other bots

#

the censor thing

#

welp @queen sentinel pls help

queen sentinel
#

Done

loud salmon
#

@earnest phoenix dont ask about the bot here

#

yardim snipe

covert turtleBOT
#
NikkaNC#6724

@loud salmon thx - 3 minutes ago

loud salmon
#

@next scaffold waitwhat

next scaffold
#

?

#

eh so I tried to ask you to unmute my bot, but you went offline after I pinged

#

soz m8

rocky dagger
#

If I have right this code should kick the mention person right?```
if (cmd === ${prefix}Kick || ${prefix}kick) {

    let kUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
    if (!kUser) return message.channel.send("Can't find user!");
    let kReason = args.join(" ").slice(22);
    if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("No can do pal!");
    if(kUser.hasPermission("MANAGE_MESSAGES")) return message.channel.send("That person can't be kicked");

    let kickEmbed = new Discord.RichEmbed()
    .setDescription("~Kick~")
    .setColor("#e56b00")
    .addField("Kicked User", `${kUser} with ID: ${kUser.id}`)
    .addField("Kicked By", `<@${message.author.id}>  with ID: ${message.author.id}`)
    .addField("Kicked In", message.channel)
    .addField("Time", message.createdAt)
    .addField("Reason", kReason);

    let kickChannel = message.guild.channels.find(`name`, "logs");
    if(!kickChannel) return message.channel.send("Can't find logs")

    message.guild.member(kUser).kick(kReason);
    kickChannel.send(kickEmbed);

    return;
}```
slim heart
#

Please use ```

#

Get rid of the other `s so that it makes it a block

#

Replace them with a normal quote or something

rocky dagger
#

are you talking to me?

slim heart
#

Yes

#

Thatโ€™s not the answer

#

I just canโ€™t look at that without dying inside

#

Is there an error message also?

rocky dagger
#

Its a block for me

slim heart
#

Oh I guess my phone dumb

#

Is there an error

rocky dagger
#

This is the respond I get in cmd: (node:16216) DeprecationWarning: Collection#find: pass a function instead (node:16216) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions at item.request.gen.end (D:\Users\Mads Fredrik Thaulow\Desktop\MyBots\discord.js\testing\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:79:15) at then (D:\Users\Mads Fredrik Thaulow\Desktop\MyBots\discord.js\testing\node_modules\snekfetch\src\index.js:215:21) at process.internalTickCallback (internal/process/next_tick.js:77:7) (node:16216) 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: 2) (node:16216) [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.

slim heart
#

The bot doesnโ€™t have permission to kick

#

Be sure to check at the beginning

#

By doing something like
if(!message.guild.me.hasPermission(โ€œpermโ€)) return

#

But what i think is happening as well is the bot canโ€™t kick that user

#

Because itโ€™s role still has to be higher

mossy vine
#

.find is also screaming

earnest phoenix
#
    at new Script (vm.js:84:7)
    at createScript (vm.js:264:10)
    at Object.runInThisContext (vm.js:312:10)
    at Module._compile (internal/modules/cjs/loader.js:684:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
    at executeUserCode (internal/bootstrap/node.js:342:17)
#

why

blazing star
#

what is your code

slim heart
#

So what you should do is check the .kickable property of the member object and it gives a Boolean of whether the bot can kick the user or not so use that property to decide whether to continue and also whether to say the bot canโ€™t kick the user @rocky dagger

#

Find the missing )

blazing star
#

what line

earnest phoenix
#

i dot know

#

*dont

blazing star
#

either you need to add or remove a )

mossy vine
#

nice token leak

blazing star
#

lmfao

slim heart
#

Exposed token

earnest phoenix
#

uh fuck

slim heart
#

Yea

earnest phoenix
#

:8

#

Where

mossy vine
#

better reset it

blazing star
#

yes

mossy vine
#

last line @earnest phoenix

blazing star
#

lmao

earnest phoenix
#

fuck

#

:x

blazing star
#

u should remove that switch

earnest phoenix
#

xD

blazing star
#

probably why

#

but also reset your tone

#

token

slim heart
#

Just regenerate it quickly

queen violet
#

cool token

#

you dont have to post it here

blazing star
earnest phoenix
#

Sorry oof

slim heart
#

Donโ€™t fuckin send it idiot

mossy vine
#

and now like 30 bots logged it nice

slim heart
#

๐Ÿคก

rocky dagger
#

So what you should do is check the .kickable property of the member object and it gives a Boolean of whether the bot can kick the user or not so use that property to decide whether to continue and also whether to say the bot canโ€™t kick the user @rocky dagger. by copy pasting this in my test server i got this message That person can't be kicked idk why

earnest phoenix
#

Thonking pls no ban

#

Fuck you @earnest phoenix why you do that

blazing star
#

compare the bots role with the members role

#

aka role hierarchy

slim heart
#

Hh

queen violet
#

stop getting annoyed at people and reset the token quickly @earnest phoenix

earnest phoenix
#

idk sorry

blazing star
#

this is why you use configs

#

or env vars

slim heart
#

Just before u kick check if .kickable is true

blazing star
#

so instead of client.login("token") it would be client.login(config.token)

earnest phoenix
#

uff

#

oof

#

im so STOOPID

#

But why he dosent works ?

slim heart
#

No what

#

Weโ€™re not gonna look through the whole thing to find it

#

Put it in a code editor and let it debug it for you and find the missing parenthesis

blazing star
#

what are you using to code

blazing star
#

if itโ€™s notepad then iโ€™ll be sad

slim heart
#

stickynotes.exe

#

Hehe

earnest phoenix
blazing star
#

ew get vscode

#

it has type support

#

and so many exceptions itโ€™s good

earnest phoenix
slim heart
earnest phoenix
#

Thonny is best for python

blazing star
#

atom is a meme

earnest phoenix
#

na

#

xD

slim heart
#

CouldIndex then put it in a js debug website

rocky dagger
#

vs code is best

earnest phoenix
blazing star
#

I didnโ€™t even know that existed as I rely on vscode to find syntax errors for me LUL

slim heart
#

Yeah I just said that cuz Iโ€™m assuming it exists I donโ€™t even know if thereโ€™s any good one

earnest phoenix
#

NTMw

#

Oof I can't type

#

There is nothing missing

#

And this time without tokens xD

#

Did you reset it yet

#

reset?

slim heart
#

Yes

earnest phoenix
#

yeas

#

Yes

slim heart
#

Go to the dev panel and hit regenerate

blazing star
#

and please use a config

earnest phoenix
#

I did

blazing star
#

so you wonโ€™t run into this issue anytime soon

slim heart
#

Ok

rocky dagger
#

the worst thing is is that i copy from youtube and my code doesn't work

earnest phoenix
#

na

slim heart
#

Then donโ€™t copy

earnest phoenix
#

isnt

#

i make it self

slim heart
#

Hhhhhh

#

CouldIndex we arenโ€™t talking about u

rocky dagger
#

its my fist bot

slim heart
#

Heโ€™s talking about myself

#

Himself*

earnest phoenix
#

ahh o

#

fuck xD

#
^

ReferenceError: client is not defined
    at Object.<anonymous> (C:\Users\NOEL-TPC\Desktop\DiscordLSwars\bot.js:17:1)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
    at executeUserCode (internal/bootstrap/node.js:342:17)
    at startExecution (internal/bootstrap/node.js:276:5)
    at startup (internal/bootstrap/node.js:227:5)```
fresh pewter
#

Hey am i allowed to ask

#

some css questions here?

earnest phoenix
#

client.on('message', msg => { if(!msg.author.bot) { if(msg.content.startsWith(".")) { var command = msg.content.toLowerCase().split(" "); console.log(command); switch(command[0]) {

#

what is wrong?

languid dragon
#

@fresh pewter yes

fresh pewter
#

ok so

#

i made a custom scroll bar

#

should look like that

#

then i added a new class

#

and it broke

#

and if i do overflow scroll
it comes with the div
but when i add 2 div
i don't know wat to do

#
<div class="holder">
          <div class="center">
              <img src="conco3.jpg" alt="404">
              <h1>Conco</h1>   
        </div>
    </div>```
#

html

#
.holder{
    overflow: scroll;
      background-image: linear-gradient(230deg,  #e7733a, #f16046, #f74b57, #f9346b, #f51a82);
       height: 100%;
       width: 100%;
       display: flex;
}

.center{
    margin: auto;
    
}

.center img{
    box-shadow: 0 0 14px 1px black;
    border-radius: 100%;
    transform: translateY(-20px);
}
.center h1{
    color: white;
    text-align: center;
    font-size: 40px;
    transform: translateY(-40px);
}```
#

css

#

the canvas is in js

#

if u want

#

i can give but its really long

void mantle
#

you cant use JS for your bot page

#

you need cert for that

fresh pewter
#

no

#

js for canvas

earnest phoenix
#

Hello, i declared my variable in top of my code and when i want reuse this variable, he is not defined, i don't know why, Someone know why my variable is not defined ? Here is my code:

if (message.content.startsWith(config.prefix + "championship"))
{
    var seconds = 0:
    //mon code
    if (splitMessage[4] === "d")
    {
        seconds = 16 * 15;
    }
}
#

And when i try this:

if (message.content.startsWith(config.prefix + "championship"))
{
    let seconds = 0:
    //mon code
    if (splitMessage[4] === "d")
    {
        seconds = 16 * 15;
        message.channel.send(seconds)
    }
}

It is work but the other not:

if (message.content.startsWith(config.prefix + "championship"))
{
    let seconds = 0:
    //mon code
    if (splitMessage[4] === "d")
    {
        seconds = 16 * 15;
    }
    message.channel.send(seconds)
}
slim heart
#

let seconds = 0:

#

Why is it : it needs to be ;

#

Idk if thatโ€™s the problem

#

But what you should also do is just
var seconds;

#

You donโ€™t have to define it as something

#

But (if itโ€™s giving no error) the only explanation i have is that somethings wrong with splitMessage meaning itโ€™s always false etc.

languid dragon
#

i think that's personal preference and really doesn't matter

#

defining it as something and using let is generally better practice

amber fractal
#

Using semi colons isnt even required mmLol

slim heart
#

I wasnโ€™t really talking about var/let but yea

#

Ik its not but he still put : but idk

languid dragon
#

im talking about defining it as something is better practice since you can't send undefined using the send method

slim heart
#

Idk if u can use : instead of ; (or nothing)

languid dragon
#

you can't

amber fractal
#

Var allows it in all scopes of the function let allows it only in that scope iirc

languid dragon
#

if you don't know why are you explaining wearies

slim heart
#

Well I said that itโ€™s wrong but I just wanted to make sure

#

And heโ€™s just gonna not respond

rocky dagger
#

if i just type anything my bot activates with this four line of codes if (cmd === `${prefix}Kick` || `${prefix}kick`) { let kUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0])); if (!kUser) return message.channel.send("Can't find user!");``````` if(cmd === `${prefix}Ban` || `${prefix}ban`) { let bUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0])); if (!bUser) return message.channel.send("Can't find user!"); does any1 know?

zealous veldt
#

What do you mean activates?

rocky dagger
#

if i type hello it writs "Can't find user!" back

zealous veldt
#

yeah

#

if there isn't a mention or an id it does that

#

you should only run inside the command its needed for

quartz kindle
#

nvm

zealous veldt
#

why are you checking to see if the command is ban or ban?

#

not even

#

checking if cmd = a string || a string is true

#

lol

quartz kindle
#

its if(1 equals 1 || 2 equals 2)
not if(1 equals 1 || 2)

rocky dagger
#

yyes

#

if you spott an error please ping me

zealous veldt
#

@rocky dagger for one

#

your if statements are wrong

#

@bitter sundial pls ban

#

should be js if(cmd === (`${prefix}command`||`${prefix}Command`)) {...}

rocky dagger
#

not if(cmd === ...)

modern sable
rocky dagger
#

or dm

zealous veldt
#

yeah, edited

rocky dagger
#

thats maby the best

zealous veldt
#

?

rocky dagger
#

isn't it if(cmd === ...)

zealous veldt
#

javascript has an order of operations

knotty steeple
#

i think you need to learn about javascript operations

rocky dagger
#

prob

zealous veldt
#

what you're doing with this js if (cmd === `${prefix}Report` || `${prefix}report`) {
is checking if cmd is ${prefix}report or if ${prefix}Report is true

#

by surrounding the strings with parens you'll make it check if it's either one of the strings instead of checking for one of them or if the other is true

inner jewel
#

adding () around the strings won't do what they want

zealous veldt
#

around both

keen drift
#

natan is invisible blurryeyes

inner jewel
#

they want a == b || a == c, not a == (b || c)

zealous veldt
#

the latter will still work

inner jewel
#

no

#

it won't handle a == c

rocky dagger
#

so then it'scss if (cmd === ${prefix}Report || ${prefix}report) {

inner jewel
#

no

zealous veldt
#

no

keen drift
inner jewel
#

add ` around the strings

zealous veldt
#

this is not a real solution either

#

what you should be doing

#

is converting your command to lowercase

#

change this js let cmd = messageArray[0];
to this

let cmd = messageArray[0].toLowerCase()```
#

then you only have to check for the lower case version

inner jewel
#

if(cmd === ("<prefix>command"||"<prefix>Command")) {...} won't handle the case of cmd = "<prefix>Command"

rocky dagger
#

i have herd of that function

knotty steeple
#

then use it

zealous veldt
#

then your if's can just be js if(cmd == `${prefix}command`) {...}

knotty steeple
#

also why do you have commands in 1 file

zealous veldt
#

yeah

#

and not even chained if statements

#

it's messy

rocky dagger
#

yea I shold do that

knotty steeple
#

no

#

thats still bad

zealous veldt
#

yeah, store commands in another file

#

good job not leaking your token though

inner jewel
#

or at least use a switch instead of if-else chains

knotty steeple
#

yes this

rocky dagger
#

I am doing that

inner jewel
#

a switch is O(1) vs O(n) for if-else chains

keen drift
#

it's Thonkang

#

hecc

amber fractal
#

Js does that? Thonk

#

i never knew that

knotty steeple
#

do you not know switch exists

amber fractal
#

Indo

#

I do*

#

Just i didnt in js

#

I did it in c# i believe

#

One of the C's ๐Ÿ‘€

bitter sundial
#

when you were using switch and people were like "thats bad practice" but all the time it was more performant and I didnt even know gg

inner jewel
#

a switch and an object/map lookup are both O(1) for any proper map implementation

knotty steeple
#
switch(a) {
    case "wew":
        return "hi"
        break;
    case "hi":
        return "no bye"
        break;
}```
keen drift
#

hecc, might need to look at the assembly when I have time for how this magic works

inner jewel
#

although O(1) doesn't necessarily mean it's faster, just that execution time is constant regardless of size

#

string switches usually generate an integer from the string then use an integer switch

#

inside the integer switch it does if-else for string equality

#

because there may be collisions

#

it's pretty much an inlined hashtable

rocky dagger
#

Dude i don' t even what a array is

#

or when its used

keen drift
#

now i'm really curious what the asm behind this is

rocky dagger
#

lol

inner jewel
#

probably a jump table

knotty steeple
#

what js course did you take

#

did you take a js course?

rocky dagger
#

taking treehouse right now

keen drift
#

js course OMEGALUL

zealous veldt
#

york best

knotty steeple
#

yes

#

its called learning the basics

keen drift
#

i just copy and paste until it works mmLol

amber fractal
#

My computer science class didnt introduce tables, objects and arrays until the end

#

It was a shit class

knotty steeple
#

well ur class is shit

amber fractal
#

yes i know

zealous veldt
#

Same fishy

rocky dagger
#

But how the crap a mi supposed to use to.lowerCase() in this?cs if(cmd === `${prefix}command`) {...}

amber fractal
#

The ctrl and c and v keys will be the first to die on my keyboard mmLol

zealous veldt
#

no

#

@rocky dagger where you declare cmd

celest bloom
#

a question: what is the "best" or the "standard" permission to look for, when a user wants to change the servers prefix. manage server?

zealous veldt
#

put .toLowerCase() at the end of the declaration

celest bloom
#

are what would you guys use

zealous veldt
#

I check for MANAGE_SERVER

amber fractal
#

You can check for a bot manager role

#

If they make that

#

Or you implement it

zealous veldt
#

I check for manage_server, or my ID lol

rocky dagger
#
    let messageArray = message.content.split(" ");
    let cmd = messageArray[0];
    let args = messageArray.slice(1);```
knotty steeple
#

i can already tell thats from some tutorial OMEGALUL

zealous veldt
#

add .toLowerCase after messageArray[0] @rocky dagger

celest bloom
#

yeah manage server makes sense๐Ÿ‘Œ

zealous veldt
#

for the cmd declaration

amber fractal
#

Using json for database is the future

celest bloom
#

i use keyv xD

#

with sqlite

rocky dagger
#

let prefix = botconfig.prefix;let messageArray = message.content.split(" ");
let cmd = messageArray[0] .toLowerCase();
let args = messageArray.slice(1);

knotty steeple
#

its a function

#

not a property

rocky dagger
#

woops

zealous veldt
#

I use rethink

rocky dagger
#

I watch a tut

amber fractal
rocky dagger
#

It's my first bot

amber fractal
#

Docs are better for learning

knotty steeple
#

and courses

amber fractal
#

^

keen drift
#

and copy and paste

knotty steeple
#

if u want to make a bot, learn js or another programming language

zealous veldt
#

yes

knotty steeple
#

FISHY

#

no

#

bad fish

zealous veldt
#

fishy and i learn the same way lol

knotty steeple
#

soon u will die like all goldfish

zealous veldt
#

theft and googling the best way to learn

celest bloom
#

yes docs are muuch better. i also started with some basic tutorials but after looking in some docs...never gonna watch a tut again xD

knotty steeple
#

i learned when i was 9

#

dumbass me at 9 still knew how to make programs work

#

most of the time mmLol

keen drift
#

still a dumbass

#

jk jerrycheese

knotty steeple
#

pls

#

i learned exactly nothing since then

#

yes

#

except making discord bots will be my fulltime job

keen drift
#

oof sad job

knotty steeple
#

no its a great job

#

i get paid exactly $200 dollars every day

keen drift
knotty steeple
#

in my currency

#

$0 in usd

keen drift
#

wew

knotty steeple
#

ok this is getting a bit shitposty

#

i will now leave

rocky dagger
#

I got toLowerCase(); to work thxmmLol

amber fractal
#

Making discord bots fulltime on fiverr

mental solstice
#

fulltime? ive gotten a couple gigs, but not enough to quit my job

rocky dagger
inner jewel
#

&permissions=<integer>

#

it's a query param

rocky dagger
#

at the end?

keen drift
#

yeah

rocky dagger
#

ok thx

celest arch
#

How would get a member count of every server using your bot in d.py

mossy vine
#

With code

zealous veldt
faint junco
formal matrix
#

Hey Guys! Iโ€™ve got a question. Can I make a Music Bot with the app Discord Bot Maker on Steam?

celest arch
faint junco
#

Don't use DBM

formal matrix
#

Ok. Wich is the best I can use?

faint junco
#

Well

celest arch
#

Coding it yourself

faint junco
#

Makin your own bot XD

formal matrix
#

Ok

earnest phoenix
#

can someone help me understand .slice in js

languid dragon
earnest phoenix
#

im literally there

#

and i dont get .slice thing

languid dragon
#

what dont you get?

earnest phoenix
#

sec

#

you know other articles also exist

#

does it count chars?

mossy vine
#

Yes

earnest phoenix
#

so , is also considered string

mossy vine
#

res will be string, yes

earnest phoenix
#

oh its one variable

zealous veldt
#

Ken I thought you were going to sleep

#

smh

earnest phoenix
#

, cofused me lol

languid dragon
#
"Apple, Banana, Kiwi".slice(4, 7);
 0123|--|
     |56|
     4  7

Result: "e, "

4 = the point at which it should *start* slicing
7 = the point in which it should *stop* slicing
#

]]ev "Apple, Banana, Kiwi".slice(4, 7);

covert turtleBOT
#
e, 
earnest phoenix
#

tnx โค

languid dragon
#

works the same with arrays, same deal
just imagine the string is split up into an array and every entry is a single char
so "A" would be the beginning of the array starting at 0

#

]]ev ["Apple", "Banana", "Kiwi"].slice(0,1);

covert turtleBOT
#
[ 'Apple' ]
earnest phoenix
#

yeah i get it now, im pretty new to js

waxen blaze
#

Hi, how can I add the whole page into long description? I tried this: <iframe src="http://example.com/"></iframe> but this doesn't work thonk

gritty bolt
#

Does anyone know any reason for my bot's forever instance to be randomly shutting off?

#

I don't get any errors it literally just shuts down

mossy vine
#

@gritty bolt where are you hosting?

gritty bolt
#

AWS Ubuntu t2.micro Linux

quartz kindle
#

is the instance itself shutting off or just the bot program?

mossy vine
#

Welp i cant help you then

gritty bolt
#

It doesn't show any signs of shutting down

#

It's being monitored 24/7

#

And it hasn't shut down once according to the logs

quartz kindle
#

you can still ssh into it?

#

does it auto restart or do you need to do something to get it online again?

gritty bolt
#

I need to do forever start again

quartz kindle
#

in aws? or in linux?

gritty bolt
#

In the instance

#

I SSH into it using PuTTY

#

On my windows PC

quartz kindle
#

and ssh stops working when it shuts down?

gritty bolt
#

No it still works

waxen blaze
inner jewel
#

check the browser console for errors

gritty bolt
#

Ok

mental solstice
#

@waxen blaze it has to be https

earnest phoenix
#

is there a limit on how many messages can be deleted at once? as bot

zealous veldt
#

100 iirc

inner jewel
#

100 per request

earnest phoenix
#

so if bot ran 2 requests

#

wont it be api abuse

inner jewel
#

and message deletion ratelimits get high very quickly

#

no

#

if you do 1000 requests then probably

earnest phoenix
#

im worried what if users abuse bot or some command

inner jewel
#

ยฏ_(ใƒ„)_/ยฏ

#

you could ratelimit the command or just have the bot leave the spam guild

#

they're not as common as you'd think

earnest phoenix
#

theres cooldown thing, ill try it

#

bless stackoverflow

#

is 10 second cooldown too much ? Thonk

mental solstice
#

discord should have a list of rate limits.. it will be way less than 10 seconds, but 10 seconds is probably fine

inner jewel
#

there's no list of ratelimits

#

they are dynamic

keen drift
#

Just gotta check the headers

#

There are some known limits

valid frigate
#

i guess you could check if x users on x guild use x commands within a span of x seconds

#

or make it into a formula, and have it leave when it is above a certain threshold

inner jewel
#

there are some known ones, and most don't really change (eg 5/5s for sending)

#

but deleting is an exception

mental solstice
#

there use to be a list of rate limits

inner jewel
#

there was never an official list

#

and even the ones that exist shouldn't be used to ratelimit discord api calls

#

as ratelimits are dynamic and can change at any moment without prior notice

#

you can use those to get an idea on what the ratelimit was the last time they were updated

amber fractal
#

There was a list according to a "staff software engineer @discordapp" on github mmLol

keen drift
#

4/1 for the reaction route

#

Autistic

inner jewel
#

1/0.25 mmLol

#

but headers are in seconds

#

and are integers

keen drift
#

I had some server owners came complaining to me that their reactions disappeared

#

Turns out it got rate limited

amber fractal
#

Nice

keen drift
#

Large guild problems

amber fractal
#

Wait Library Developer? I didnt even realize that it was that role that gave you a neat color mmLol

keen drift
earnest phoenix
#

Anyone know anything about json files?

amber fractal
#

A lot

#

kinda

#

Why use json tho

earnest phoenix
#

Lol ok so i have a few json files that keep deleting while using commamds. Why would this happen?

amber fractal
#

Are you reading/writing them with these commands?

earnest phoenix
#

No

sick cloud
#

then its not your bot

earnest phoenix
#

Hmmm ok.. I wonder what it is

amber fractal
#

It only happens when you do specific commands?

#

or is it any

earnest phoenix
#

Specific

amber fractal
#

Do they reset to {} or fully delete the file

earnest phoenix
#

It deletes everything out of the file including the brackets

amber fractal
#

Are you able to send the code for the commands or is it sensitive info>

#

?*

earnest phoenix
#

Which part of the code? I'd rather not send it here though

mental solstice
#

are you using json files as data storage?

amber fractal
#

^

#

I probably shouldve asked that

earnest phoenix
#

Somewhat yet

#

Yes*

#

God cant spell

mental solstice
#

more often than not, you will end up corrupting your files by trying to read/write while the file is open

earnest phoenix
#

Coins, XP,Autoroles and Server Prefixes

mental solstice
#

yeah, thats just a bad idea, using a database will be your best bet

amber fractal
#

I use json for all those things, going to move to a database asap I just need to learn one and transfer data

#

I havent had it corrupt yet

zealous veldt
#

thats a ticking timebomb

earnest phoenix
#

I know a little about mysql just not enough to do that

mental solstice
#

if you do it correctly steven, its possible

zealous veldt
#

emphasis on yet

mental solstice
#

Mike, what language?

earnest phoenix
#

Js

amber fractal
#

Is there any db thats as simple as json cuz json is so easy to get stuff out of.

inner jewel
#

json is not a db

mental solstice
#

i use mongodb

amber fractal
#

I know

mental solstice
#

not with JS though, im sure there is a library

keen drift
#

Mongo is bson

earnest phoenix
#

I use MySQL for most of my data

amber fractal
#

What is a good database thats easy for js?

#

any suggestions?

mental solstice
#

yeah, its pretty easy to implement tho

amber fractal
#

Transferring my current data will be the hardest part

earnest phoenix
#

MySQL is my recommendation.

mental solstice
#

you should be able to automate it all

earnest phoenix
#

Mongo over charged me once

mental solstice
#

mongo is free?

#

i run the server on my pc

earnest phoenix
#

They charged me $453 one month out of no where

zealous veldt
#

rethink is nice

amber fractal
#

Is it easy @zealous veldt

zealous veldt
#

yeah

#

well

#

set up can be a pain in the ass

#

but I can help y ou

#

but using it is easy

inner jewel
#

rethink can be a bitch

earnest phoenix
#

You can transfer json file to MySQL if you absolutely needed

inner jewel
#

i've had it do stupid shit more than enough times to want to rm -rf it asap

earnest phoenix
#

Lol

amber fractal
#

Alright Ill install mongodb and try that

zealous veldt
#

make sure to properly secure it

amber fractal
#

No idea what that means

topaz fjord
#

mongodb doesn't come with security pre installed i believe

amber fractal
#

I know what securing is

#

I dont know how to do it*

#

Better way to put that

inner jewel
#

configure iptables to drop outside traffic to the mongodb port

topaz fjord
amber fractal
#

to access my db will I need to MongoClient.connect in every seperate file or once connected it will just stay connected?

zealous veldt
#

use mongoose

amber fractal
#

?

#

Cant even figure out how to create a db mmLol

fierce owl
#

Hey can I have some help

client.on('message', message => {
    if (!message.guild) return;
    if (message.content === prefix + 'test')
        channel.send('Testy mc test') //I know that there needs to be a message before channel but I did that so I can have an error to display
}).catch(err => console.log(err) message.channel.send('**Error** ' + err + ' This has been sent to our developers') client.users.get("335227605777121281").send("There has been an error " + err))

It gives an error stating .catch(...) is not a function

Any help (d.js)

earnest phoenix
#

my guess is that you need to await it

fierce owl
#

can you explain plz

inner jewel
#
client.on('message', message => {
    if (!message.guild) return;
    if (message.content === prefix + 'test')
        channel.send('Testy mc test') //I know that there needs to be a message before channel but I did that so I can have an error to display
})```
#

you're doing client.on(...).catch

fierce owl
#

yeah

inner jewel
#

the catch should go on send()

#

client.on doesn't return a promise

fierce owl
#

ok

amber fractal
#

Ok this database stuff is actually confusing the hell out of me

ruby dust
#

how would I change the timestamp of a pre-built embed in discord.py?

mental solstice
#

what did you go with Steven

amber fractal
#

I swithced to rethinkdb

late hill
#

Or just use a platform that hosts the db for u and takes care of security

#

For mongo you can use Atlas or mlab

#

Mlab has a sandbox plan

#

Which is free

#

Yet still reliable

#

If you're using js and want to use mongo, as moose said, mongoose is helpful

#

If you read their docs you should be able to figure it out.

amber fractal
#

I have no idea what to do about that error, same thing happened with the dblapi I always got connection refused

#

Idk how it started working.

#

If you have any ideas of how i could fix this, please dm me or @me here thx

mental solstice
#

do you have the server running?

amber fractal
#

It should be

#

same error my webhook was giving me

inner jewel
#

nothing is running on that port

amber fractal
#

Its the port the db connects to

#

or tries

#

But it says connection refused when it tries to connect

inner jewel
#

because there's nothing running