#development

1 messages ยท Page 1083 of 1

pure lion
quartz kindle
#

yes

#

i would wait

pure lion
#

so to set up the server on my host

#

the console line thingy has a $, is this significant in any way?

#

eh its probably fineeee

silver dust
#

i really need help

#

so i said

#

if(message.member.roles.cache.has('736254361541279794')){
message.channel.send('https://youtube.com')

     } else{
      message.channel.send('You cant use this command.')
     }
#

but it didnt work

#

people have 736254361541279794 role werent able to use that command

pure lion
#

i dont think message.member.roles has a cache

#

are there any errors?

silver dust
#

nope

quartz kindle
#

it does have a cache

pure lion
#

oh

#

sick

silver dust
#

yeah but why it doesnt work?

#

im confused

#

im new to these things

#

and i was playing around

pure lion
#

hmmm

quartz kindle
#

the code is correct

#

are you sure the role id is correct?

silver dust
#

yep

#

lemme check again

quartz kindle
#

console.log(message.member.roles.cache)

silver dust
#

thanks

#

lemme try

#

console.log(message.member.roles.cache)
@quartz kindle hm didnt work

quartz kindle
#

its not supposed to work

#

its for you to see whats going on

#

in your console

silver dust
#

oh

#

ok

pure lion
#

or use bre-

silver dust
#

what?

pure lion
#

nothing

quartz kindle
#

well? what did your console say?

silver dust
#

a bunch of things

#

but i think

#

UnhandledPromiseRejectionWarning: ReferenceError: message is not defined

#

this is the main

quartz kindle
#

lol

#

then thats why it didnt work

silver dust
#

so

#

what i have to do?

quartz kindle
#

you are trying to use message where it doesnt exist

silver dust
#

and?

quartz kindle
#

and what?

#

thats the problem

#

go look in your code and fix it

#

or if you dont know how, show your code

silver dust
misty sigil
#

rest of it

honest perch
#

what does Threshold surpassed: 10000 mean on lavalink

earnest phoenix
#

The threshold was surpassed.

misty sigil
#

no shit sherlock

earnest phoenix
#

sherlock shat his pants

honest perch
#

wth is a Threshold and why was it surpassed

earnest phoenix
#

but for real idk

silver dust
#

why not working

#

sad

earnest phoenix
#

send all of the code bruh

quartz kindle
#

i told you to show your code

silver dust
#

bot.once('ready', () => {
console.log(Santas little helper is ready to help!);
bot.user.setActivity('helping santa');
});

bot.on('message', message=>{

if(!message.content.startsWith(prefix) || message.author.bot) return;

const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();

  if(command === 'ping'){
    message.channel.send('i wont ping');
  
  } else if (command == 'mod'){

     if(message.member.roles.cache.has('736254361541279794')){
          message.channel.send('secret mod command shh')

     } else{
      message.channel.send('You cant use this command.')
     }
earnest phoenix
#

```js
code here
```

quartz kindle
#

the error is not coming from that code

silver dust
#

if(message.member.roles.cache.has('736254361541279794')){
message.channel.send('secret mod command shh')

     } else{
      message.channel.send('You cant use this command.')
     }
earnest phoenix
#

Oof

quartz kindle
#

pieces of code out of context dont help

solemn latch
#

the error will tell you what line of code is causing the error typically

quartz kindle
#

your error is somewhere in the middle of everything and can only be found by seeing all of it

#

because its context-dependent

silver dust
#

all of the script?

quartz kindle
#

yes

silver dust
#

const Discord = require('discord.js');
const bot = new Discord.Client();

const prefix = '!';

const fs = require('fs');

bot.commands = new Discord.Collection();

const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for(const file of commandFiles){
const commands = require(./commands/${file})

 bot.commands.set(command.name, command)

}

bot.once('ready', () => {
console.log(Santas little helper is ready to help!);
bot.user.setActivity('helping santa');
});

bot.on('message', message=>{

if(!message.content.startsWith(prefix) || message.author.bot) return;

const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();

  if(command === 'ping'){
    message.channel.send('i wont ping');
  
  } else if (command == 'mod'){

     if(message.member.roles.cache.has('736254361541279794')){
          message.channel.send('secret mod command shh')

     } else{
      message.channel.send('You cant use this command.')
     }
     
    
    
    }else if (command == 'monkey'){
    message.channel.send('dude im a bot, not a monkey');
  
  }else if (command == 'hello')
    message.channel.send('hi there human!')

});

bot.login('token');

solemn latch
#

yikes token leak

crystal socket
silver dust
#

yikes token leak
@solemn latch changed it

crystal socket
#

doesn't matter its already been disabled in the bots in here

lament laurel
#

token leak owo

misty sigil
#

yIKES

#

omg

#

use a config

lament laurel
#

you prob wanna delete that

opal plank
#

no code blocks, no hastebin, token leak

#

going for streaks i see

lament laurel
#

and use a config.json

misty sigil
lament laurel
#

@silver dust can you please delete it, your leaking your token.

crystal socket
#

and use a config.json
@lament laurel thats bad

#

use env vars

lament laurel
#

better than leaking it

#

:/

opal plank
#

json > envs

silver dust
#

ITS RESETED

slender thistle
#

Token is invalid by now anyway

lament laurel
#

i use envs tho

#

:/

opal plank
#

having to add an env for everything is annoying af

lament laurel
#

not in my opinion

opal plank
#

json + require/import

quartz kindle
#

anyway i still dont see the error anywhere, show the full error

earnest phoenix
#

Jsons was always better than env...

opal plank
#

^^

solemn latch
#

dotenv?

opal plank
#

env variables eew

solemn latch
#

pretty much just a config at that point ๐Ÿค”

quartz kindle
#

if you use pm2 and have multiple projects, you can also use an ecosystem file

#

and put all your tokens in there

lament laurel
#

well guess what

#

either env or json

#

its better than leaking your token.

silver dust
earnest phoenix
lament laurel
#

i mean watcha expect

solemn latch
#

yeah i posted it on github to reset it aswell

#

just incase

#

๐Ÿค”

#

tokens posted on github reset them

opal plank
#

discord and github collabing to make newbies less targetable

#

how cute

solemn latch
#

iirc, a lot of things are on it

silver dust
#

i just needed help ๐Ÿ˜”

#

now my token

opal plank
#

we dont know whats erroring

#

you just gaev code

earnest phoenix
#

What was the issue you're having

#

I'm confused

silver dust
#

people have 736254361541279794 role werent able to use that command

solemn latch
#

give the full error plox

misty sigil
#

and code

#

preferably in a code block

#

and without a token

silver dust
#

UnhandledPromiseRejectionWarning: ReferenceError: message is not defined

solemn latch
#

full error

misty sigil
#

thats not full

#

where is the error coming from

earnest phoenix
#

Wait how's that error even coming up, might be from somewhere else

misty sigil
#

yea

earnest phoenix
#

Full error would guide us to help you where the error is coming from and close this case

misty sigil
earnest phoenix
silver dust
#

damn

earnest phoenix
#

So... You gonna show the full error or

honest perch
#

@twilit rapids do you play from youtube on chip

twilit rapids
#

Yes

earnest phoenix
#

(Isn't it frustrating when somebody asks for help but doesn't do what you're saying to help them fix this OMEGALUL)

opal plank
#
bot.once('ready', () => {
  console.log(`Santas little helper is ready to help!`);
  bot.user.setActivity('helping santa');
});
bot.on('message', message => {
  if (!message.content.startsWith(prefix) || message.author.bot) return;
  const args = message.content.slice(prefix.length).split(/ +/);
  const command = args.shift().toLowerCase();
  if (command === 'ping') {
    message.channel.send('i wont ping');
  } else if (command == 'mod') {
    if (message.member.roles.cache.has('736254361541279794')) {
      message.channel.send('secret mod command shh')
    } else {
      message.channel.send('You cant use this command.')
    }
  } else if (command == 'monkey') {
    message.channel.send('dude im a bot, not a monkey');

  } else if (command == 'hello')
    message.channel.send('hi there human!')
});
bot.login('token');```
misty sigil
#

(yes)

honest perch
#

@twilit rapids how do you cycle through ips?

silver dust
#

nhandledPromiseRejectionWarning: ReferenceError: message is not defined
at Client.<anonymous> (/Users/alitugratasci/Desktop/humpty/index.js:22:15)
at Object.onceWrapper (events.js:421:28)
at Client.emit (events.js:315:20)
at WebSocketManager.triggerClientReady (/Users/alitugratasci/Desktop/humpty/node_modules/discord.js/src/client/websocket/WebSocketManager.js:433:17)
at WebSocketManager.checkShardsReady (/Users/alitugratasci/Desktop/humpty/node_modules/discord.js/src/client/websocket/WebSocketManager.js:417:10)
at WebSocketShard.<anonymous> (/Users/alitugratasci/Desktop/humpty/node_modules/discord.js/src/client/websocket/WebSocketManager.js:199:14)
at WebSocketShard.emit (events.js:315:20)
at WebSocketShard.checkReady (/Users/alitugratasci/Desktop/humpty/node_modules/discord.js/src/client/websocket/WebSocketShard.js:467:12)
at WebSocketShard.onPacket (/Users/alitugratasci/Desktop/humpty/node_modules/discord.js/src/client/websocket/WebSocketShard.js:439:16)
at WebSocketShard.onMessage (/Users/alitugratasci/Desktop/humpty/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
(node:19052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19052) [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

#

eh

valid frigate
#

dawg

opal plank
#

message should be on brackets, no?

valid frigate
#

no

twilit rapids
valid frigate
#

lambda functions with one parameter you dont need brackets

earnest phoenix
#

22th line on index.js

#

Wot

misty sigil
#

isnt it bot.on not bot.once

opal plank
twilit rapids
#

once is better for ready event

opal plank
twilit rapids
valid frigate
#

the ready event should only fire once

solemn latch
#

^

valid frigate
#

message is inferred

#

youre the typescript dude right

#

iirc you dont need to explicitly define it

opal plank
#

oh, right

#

not on js

#

you right

valid frigate
#

ya

earnest phoenix
#

@opal plank parameters... If only one, no parentheses needed, but if 2 parameters, parentheses are needed

opal plank
#

fair

earnest phoenix
#

Like a function call back

valid frigate
#

????

#

that's a lambda function

#

it has no callback lmao

earnest phoenix
#

facepalm wot

valid frigate
#

anonymous function

#

fat arrow

#

?

earnest phoenix
#

Umm

#

I'm so confused wtf

valid frigate
#

one sec

opal plank
misty sigil
#
1 const Discord = require('discord.js');
2 const bot = new Discord.Client();
3
4 const prefix = '!';
5
6 const fs = require('fs');
7
8 bot.commands = new Discord.Collection();
9
10 const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
11 for(const file of commandFiles){
12     const commands = require(./commands/${file})
13
14     bot.commands.set(command.name, command)
15 }
16
17
18
19 bot.once('ready', () => {
20  console.log(Santas little helper is ready to help!);
21  bot.user.setActivity('helping santa');
22 });
23
24 bot.on('message', message=>{
25
26
27  if(!message.content.startsWith(prefix) || message.author.bot) return;
28
29    const args = message.content.slice(prefix.length).split(/ +/);
30    const command = args.shift().toLowerCase();
31
32      if(command === 'ping'){
33        message.channel.send('i wont ping');
34
35      } else if (command == 'mod'){
36
37         if(message.member.roles.cache.has('736254361541279794')){
38              message.channel.send('secret mod command shh')
39
40         } else{
41          message.channel.send('You cant use this command.')
42         }
43
44
45
46        }else if (command == 'monkey'){
47        message.channel.send('dude im a bot, not a monkey');
48
49      }else if (command == 'hello')
50        message.channel.send('hi there human!')
51 });
52
53 bot.login('token');
```this is the code with line numbers for debug info
opal plank
#

i think this relates to strict though

valid frigate
#

basically you cant access this inside a class method

#

via arrow function

opal plank
#

though usually afaik you need parenthesis

pure lion
#

i wanna move this element up but im not sure how

#

wait shit

valid frigate
#

for zero parameters yeah

earnest phoenix
#

@misty sigil i don't know if that's correct though... It says the error is on line 22

misty sigil
#

yea

#

same

#

its on });

valid frigate
#

seriously mates

#

20 console.log(Santas little helper is ready to help!);

opal plank
#

lul

#

also fyi

#

i didnt copy the whole code

#

AND the person who asked isnt here anymore

valid frigate
#

nae nae whip

#

<o/

opal plank
pure lion
#

i wanna move that up

opal plank
#

pls put a background

#

for both of our sakes

pure lion
#

no >:c

earnest phoenix
#

Why are you giving me cancer

#

My eyes

opal plank
#

1997 asked for the website style back

#

:c

valid frigate
#

hey man

pure lion
#

e >:c

opal plank
#

just set a background url

valid frigate
#

is that on purpose please

opal plank
#

makes it easy on the eye

valid frigate
#

also get rid of the drop shadow

#

or change the text color

opal plank
#

its not shittalk, its feedback

valid frigate
#

or reduce its effect

opal plank
#

it really look some MsPaint type of deal

#

slap a background and it should improve drastically already

placid iron
#

Looks 2005

valid frigate
#

grammar issues

placid iron
#

Yeah, remove the dropshadow and have a background

sudden geyser
#

thiscord

placid iron
#

Will look so much better

earnest phoenix
#

It looks like one of those 2007 scam websites wtf LULW

opal plank
#

Dice lowkey blocking all of us for shittalking his hard work

placid iron
earnest phoenix
#

Lol

valid frigate
#
aleBot - The new, revolutionary Discord bot! With image manipulation, advanced XP system, generated rank card images, weather, a QR generator, a translator, polls, ASCII and much more coming soon!
#

there i fixed some small grammar errors

opal plank
#

i swear this aint cyberbullying, we just bullying him in a constructive way

valid frigate
#

slap this shit on and boom beautiful content

opal plank
#

for the record

earnest phoenix
#

Poor tim dealing with this stuff everyday

opal plank
#

aight back to manual labour

#

||ey, we all here everyday too >:c||

placid iron
#

While you are at it

#

Nothing dw

earnest phoenix
#

I mean yea you're all here too, but not as much as tim

quartz kindle
#

not everyday

opal plank
#

hmmmmmmmm

quartz kindle
#

im not that insane

earnest phoenix
#

Lol

misty sigil
#

tim is like the most relied on person ever KEKW

earnest phoenix
#

Idk man, i always see you here though

opal plank
#

okay for real though

quartz kindle
#

only because i do it for free

opal plank
#

THERE HAS TO BE A BETETR WAY

quartz kindle
#

for now

misty sigil
#

i only know how it feels because some dude just @jeremy clarkson#0001 how do i use embeds in bot ghost

opal plank
placid iron
#

What

opal plank
#

someone pls help

placid iron
#

Why

opal plank
#

cuz i need 99 gifs

#

countdown gifs

earnest phoenix
#

for now
@quartz kindle monkaW Don't quit, begginers can't continue without you

opal plank
pure lion
#

why are people bullying me for being bad at web design pandasad

misty sigil
#

we arent bully

opal plank
#

we just giving you inspiration

placid iron
#

Oh, can't you just generate them in code

valid frigate
#

?

placid iron
#

Python?

valid frigate
#

nobody is bullying you we are offering help

quartz kindle
#

sorry, i have the bad habit of eating everyday

opal plank
#

||while saying its shit though||

valid frigate
#

did

#

also on a side note did you generate 99 artboards in illustrator

#

photoshop

opal plank
#

nah

#

i manually types them

#

thats why i was considering canvas

#

but equally as much effort

valid frigate
#

mate you can do that in premiere pro as well

#

just look at my boy @pale vessel 's avatar, it was my old one

opal plank
#

also hassle

earnest phoenix
#

Bruh i just made that in a few lines, no need for that many artboards

#

Canvas is just for this

#

Oof

opal plank
#

ik

#

i could've used canvas

#

but a: i dont have cavas installed

#

b

#

i hate canvas

#

c i hate canvas

earnest phoenix
#

Why though

opal plank
#

canvas without libs is just obnoxiously annoying to learn

earnest phoenix
#

I mean it's fun, you get to master it while using it

opal plank
#

thats the whole problem

earnest phoenix
#

It's not that hard

opal plank
#

i got Ts to worry about now

#

one thing at a time

earnest phoenix
#

Oh you on ts?

opal plank
#

i did see photoshop has scripts tho

#

yeah

earnest phoenix
#

I see why

opal plank
#

whole lot to learn

earnest phoenix
#

Canvas on ts is hell

opal plank
#

pls, motivate me more

#

go on

valid frigate
#

.......canvas?

opal plank
#

who needs canvas when you can manually draw it?

earnest phoenix
#

Oh god, idk like just try to use it... And like creating Optional things and stuff

valid frigate
#

i mean if you have after effects

#

it's probably the better choice

opal plank
#

interfaces with canvas sounds like a whole lot of fun

#

im already down half way

#

lmao

earnest phoenix
#

When I'm bored i just use canvas to make some things that are fun to work with

#

That's how i mastered it

opal plank
#

tbh i dont regret only starting Ts now

#

cuz i was being pushed to move to it quite a while ago

#

and i kept postponing

#

glad i did it now though

#

quite a good timing

#

enough Js knownledge to have a foothold on Ts

earnest phoenix
#

So in this switch, do you like js or ts more

opal plank
#

Ts is way more strict, though from what i see, its much better than Js

earnest phoenix
#

Yea resolves some errors you get that you can't solve and helps but sometimes it's a pain

opal plank
#

||Js is looser than a whores cu*t|| it lets everything pass by without errors even though its clearly wrong

earnest phoenix
#

Ts doesn't?

#

Wtf are the possibilities monkaHmm

tight plinth
#

Yes

earnest phoenix
#

Oh

opal plank
#

pg.query => promise.accesspropertyofpromise

#

its a no go

#

theres a ton of small stuff that needs to be fixed

#

js lets you access values of promises without batting an eye

#

when i ported the code, i was well over 3 digit errors

earnest phoenix
#

Yea you should resolve the promise before accessing a property on it so good point, +1 for ts

opal plank
#

though to be fair, i have strict-mode on

#

i think it was over 200 errors

#

almost at 300

earnest phoenix
opal plank
#

Js was like : ey, i can run it

#

Ts like: nope

pure lion
#

how do i make an image fit the screen size and stay static?

opal plank
#

flex?

crisp geyser
#
at RequestHandler.execute (/home/ubuntu/ZSurviveBot/node_modules/discord.js/src/rest/RequestHandler.js:107:21)
at processTicksAndRejections (internal/process/task_queues.js:97:5)```

Anyone knows what can cause this? I got this like 4 times in the morning while I was sleeping...
pure lion
#

a

earnest phoenix
#

Connection issues mate

crisp geyser
#

But what kind of connection issues?

opal plank
#

lemme go back to slave work with photoshop

#

be back in 10

pure lion
#

how do i automatically fit screen size?

opal plank
#

isnt % a thing?

pure lion
#

oh

crisp geyser
#

I mean, is it my fault or Discord's?

earnest phoenix
#

@crisp geyser uhh, connection issue is a connection issue?

opal plank
#

fuck its been a while i fucked with css

pure lion
#

not sure how to use x)

earnest phoenix
#

@crisp geyser where do you host

opal plank
#

i worked with css quite a while ago, but it was snippets, not full of development

crisp geyser
#

OVH

earnest phoenix
#

Well idk if it's discord's problem or the hosts

#

Seems Suspicious

crisp geyser
#

Don't think it could be OVH's fault, but idk

pure lion
#

aaaaaaaaaaa

earnest phoenix
placid iron
#

4 is wide

earnest phoenix
#

Just like wide putin

opal plank
#

nice

tight plinth
#

Yes

#

Also core 69 when

earnest phoenix
#

I sent an image looking like i sent an actual embed

#

Wtf

twilit rapids
#

Seems like 4 is wider than 1-3 and 5-8

#

F

#

I mean since Nice is 0%, you can just remove that

opal plank
earnest phoenix
#

Oof

opal plank
#

big oof

pure lion
#

so um

#

the image tiles but i dont want it to

opal plank
#

22

#

wtf

pure lion
#

22

earnest phoenix
#

@opal plank why is 17 and 22 a gif

opal plank
#

i just changed em

earnest phoenix
#

i use .ts

opal plank
#

any other off?

earnest phoenix
#

Also 68

opal plank
#

fixed

#

any other?

earnest phoenix
#

I don't see any other

opal plank
#

prufect, 4 eyes better than 2

#

ty

tight plinth
#

Also yeah 4 is wider of some pixels

opal plank
#

now time to slap those badboys somewhere

earnest phoenix
#

How tho idk, isn't all has to be exact same pixels or whatever

#

Mapped and all has the same values

#

Kinda interesting, very interesting

placid iron
#

Code block

earnest phoenix
#

Code blocks are cool and all, but any idea of why would discord disable it's colors to mobile discord

quartz kindle
#

they like didabling things on mobile

placid iron
#

The only reason I can think of is that lazy

#

They are too lazy to implement it

tight plinth
#

By looking at the mobile code, the colored block codes feature is not even implemented

quartz kindle
#

afaik its powered by highlight.js

#

maybe they didnt get it to work on mobile for some reason lmao

opal plank
#

pls tell me bots can react with emoji name only

#

and not id

#

PLEASE

#

i dont wanna make a json obj with a emoji id for each gif

placid iron
#

Emojis and bots are soooo annoying

#

I wish you luck

opal plank
#

fml

#

FML

#

it gets worse by the minute

placid iron
#

How

zealous torrent
#

How could I make it so if a users account isnโ€™t a day old, it sends back a embed saying wait 1 day till you can use this bot

crystal socket
digital ibex
#

what library, @zealous torrent ?

pure lion
#

eeee

zealous torrent
#

discord.js

pure lion
#

easy

digital ibex
#

if (Member.createdTimestamp <= 8.64e+7) return message.channel.send('retard');

pure lion
#

lmao

#

did bob get fired?

zealous torrent
#

Ok thanks lol

digital ibex
#

yeah

pure lion
#

:(

opal plank
#

-.-

#

yo lowkey why VSC does this?

#

sometimes i can access objects with collapse, sometimes i cant

#

debugger session

earnest phoenix
#
        const opts = {
            maxResults: 1, 
            key: process.env.YOUTUBEKEY, 
            type: "video" 
        };
        const songArg = await search(args.join(' '), opts);
        const songURL = songArg.results[0].link;
        const songInfo = await ytdl.getInfo(songURL);
        let conection = await message.member.voice.channel.join()
        let dispacther = conection.play(songURL)
earnest phoenix
#

mmm

#

How would I add a , In between every 3 words?

#

Ping me

solemn latch
#

youd likly have to build something for that

finite bough
#

how to change the permission of a category

pure lion
#

Anyone know of any good very cheap node vps?

solemn latch
#

very cheap is like contabo or whatever its called

misty sigil
#

oxide

#

cheaper than contabo afaik

solemn latch
#

oxide is a terrible name for a company.
cant just google it

misty sigil
#

oxide.host :)

finite bough
#

glitch

pure lion
#

EW

#

I'm going to be sick

finite bough
#

glitch very good

#

i know a 2$ vps

#

want it?

earnest phoenix
#

how i get "link"?

#

index the array to get the object

#

then you just use the appropriate property

earnest phoenix
#

quick question does channel.overwritePermissions work on discord.js 12

blazing portal
earnest phoenix
#

thx

blazing portal
#

Anyone know how to make the bot automatically update it's status everytime it joins a new guild?
@earnest phoenix Add the status command to your guild join event

earnest phoenix
#
        let role = msg.guild.roles.cache.find(r => r.name == 'Muted');

        if (!role) {
            try {
                role = await msg.guild.roles.create({
                    name: 'Muted',
                    color: '#FF0000',
                    permissions: [],
                });

                msg.guild.channels.cache.forEach(async (channel, id) => {
                    await channel.overwritePermissions(role,                 [
                        {
                           deny: ['SEND_MESSAGES','ADD_REACTIONS'],
                        },
                      ],);
                });
            }
            catch (e) {
                console.log(e.stack);
            }
        }```
i am having problems here  [Symbol(code)]: 'INVALID_TYPE'
blazing portal
#

Why do you have the permissions inside an object inside an array?

unkempt monolith
#

xD

earnest phoenix
#

hmmm i was looking at the doc and see it like this

  {
     id: message.author.id,
     deny: ['VIEW_CHANNEL'],
  },
], 'Needed to change permissions');``` so i changed it to that
#
        let role = msg.guild.roles.cache.find(r => r.name == 'Muted');

        if (!role) {
            try {
                role = await msg.guild.roles.create({
                    name: 'Muted',
                    color: '#FF0000',
                    permissions: [],
                });

                msg.guild.channels.cache.forEach(async (channel, id) => {
                    await channel.overwritePermissions(role, {
                        SEND_MESSAGES: false,
                        ADD_REACTIONS: false,
                    });
                });
            }
            catch (e) {
                console.log(e.stack);
            }
        }``` this is the old code it used to work but it doesn't anymore
blazing portal
#

You still have the object inside an array

earnest phoenix
#

i see so do i just remove it

blazing portal
#

yes

earnest phoenix
#

alr thx

cunning gorge
#

why does it give me this error

#

even though I check for it

sudden geyser
#

What is member

cunning gorge
#
  var member = message.mentions.members.first() || client.user
tranquil sandal
#

how i can create a html code for the description
likt this?

sudden geyser
#

is member defaulting to the client user

tranquil sandal
#

this colored descriptions

#

etc

cunning gorge
#

well the error occured when im pinging someone

#

a real human

#

or member

#

not a bot

#

so it falls under the message.mentions.members.first() i think

sudden geyser
#

Hmm, could you try logging member to see what you get.

cunning gorge
#

okayy

sudden geyser
#

Mr. P if you're referring to the pink/red text, you could use inline code in markdown.

tranquil sandal
#

Mr. P if you're referring to the pink/red text, you could use inline code in markdown.
@sudden geyser yes

#

can u send me a markdown table pls

low shard
#

@earnest phoenix link of what

digital ibex
#

hi

#

the logo to be inline with "Square"

low shard
#

@digital ibex Lol

digital ibex
#

?

honest perch
#

Yes

exotic condor
#

@digital ibex so are you trying to make something on a language that uses a canvas?

digital ibex
#

this is webdev

#

just html/css

exotic condor
#

Have you tried rescaling the icon to fit into the target?

pale vessel
#

display absolute or float right?

digital ibex
#

i got it

#

i just done text-align: right; on the parent div and it worked

exotic condor
#

Great!

digital ibex
#

now it does this lol

exotic condor
#

Oh

digital ibex
#

how can i move the "Square" back to where it was?

exotic condor
#

If thisโ€™s the code directly after the previous result, just simply undo it

digital ibex
#

this is the html: html <div class="header"> <p class="subtitle is-4">Square</p> <img class="logo" src="logo" width="70" height="50" /> </div>

#

wdym?

pale vessel
#

float left

digital ibex
#

im trying to make the logo be on the right and text be on the left

#

kk

exotic condor
#

Then separate both the text and logo as different classes

digital ibex
#

ah ha

#

ah ha, thanks

pale vessel
#

nice

exotic condor
#

Perfect!

digital ibex
#

thats just gonna make it mesy doe D:

exotic condor
#

HTML and CSS both need more experiment when trying to get the perfect results

digital ibex
#

quickkk question

#

how can i do this?

#

what i done

empty owl
#

font-size:

#

waiot

solemn latch
#

๐Ÿค”

empty owl
#

put a span

digital ibex
#
<p class="subtitle is-4 b-name">Square <span class="position">Community Manager</span></p>
#

yeah

empty owl
#

position: {
font-size: a number smaller than the first
}

digital ibex
#
      .position {
          font-weight: 200;
      }``` doesnt change
amber fractal
#

font weight is not the same as font size

empty owl
#

try font-size

digital ibex
#

yeah

amber fractal
#

weight is the boldness iirc

digital ibex
#

i want it less bold

#

kk

amber fractal
#

yeah then weight should be what you want if you dont want it as bold

pale vessel
#

add it as span and make the weight 400 or smaller

quartz kindle
#

only specific levels of weight are supported by browsers, for example bold is 700, normal is 400, but anything between 400 and 700 does nothing

pale vessel
#

oh you did

digital ibex
#

font-size works

empty owl
#

but thats just smaller

pale vessel
#

but that's just size

empty owl
#

u wanted thinner?

pale vessel
#

400 should work no?

#

assuming it's bold right now

digital ibex
pale vessel
#

oh

digital ibex
#

any ideas?

empty owl
#

maybe use the light version of the font or something if u want it thinner

#

which part bolder

pale vessel
#

get a custom font

digital ibex
#

the "communitu manger"

amber fractal
#

Tim who did you sell your soul to in order to know the most random developing questions whenever they come up in #development

empty owl
#

is it bold @digital ibex

#

<strong>

digital ibex
#

kk

quartz kindle
#

lol

pale vessel
#

or <b>

amber fractal
#

<strong> is html5 iirc

pale vessel
#

what's the difference between strong and b and em and i

amber fractal
#

b is no longer supported

#

HTML5 changed how that stuff worked

pale vessel
#

could've sworn b is still supported

digital ibex
#

okay

#

i made some changes

amber fractal
empty owl
#

Someone: I'm a html programmer!
Me:
html is not a programming langauge

digital ibex
empty owl
#

flexbox

#

just

#

instead of putting

amber fractal
#

they are supported, just mean different things now

empty owl
#

community manager inside the h1

pale vessel
#

yeah ic

digital ibex
#

it is

empty owl
#

put it outside and use flexbox column

#

i dont remember which property

#

tho

pale vessel
#

or just make it a block

digital ibex
#

<p class="subtitle is-4 b-name">Square <span class="position"><strong>Community Manager</strong></span></p> ?

empty owl
#

flexbox column in the container

#

no take it out of P

#

something like

digital ibex
#

display: flexbox; ~~ no bulli if rong ~~

#

?

empty owl
#
<div class="container"> 
    <p> Text </p>
    <p> other text </p>
</div>```
digital ibex
#

so, remove the span?

empty owl
#

u can remove the span and instead add it to the p

digital ibex
#

kk

empty owl
#

then use flex-direction: column; and display: flex; in the container

digital ibex
#

kk

empty owl
#

replace text and other text with ur words and add clases

#

idk where to put <strong>

pale vessel
#

in p?

digital ibex
#

ahh

empty owl
#

put back ur classes

digital ibex
#
<div class="header">
            <p class="subtitle is-4 b-name">Square</p>
            <p class="position"><strong>Community Manager</strong></p>```
#

yeah

#
      .header {
          flex-direction: column;
          display: flex;
          text-align: right;
          background-color: #8db3f0;
          height: 63px;
      }```
empty owl
#

use

#

justify-content: flex-start;

#

in the container

digital ibex
#

kk

#

replace flex-direction: column; display: flex;with that?

empty owl
#

yea

digital ibex
#

kk

#
      .header {
        justify-content: flex-start;
          text-align: right;
          background-color: #8db3f0;
          height: 63px;
      }```
split nova
#

Wy trynna do

digital ibex
#

move community manager under square

split nova
#

Are they in the same div?

digital ibex
#

yeah

#

this is the html

#
<div class="header">
            <p class="subtitle is-4 b-name">Square</p>
            <p class="position"><strong>Community Manager</strong></p>```
empty owl
#

why did u remove

#

the display:flex

empty owl
#

and flex-direction: cloumn

split nova
#

If they are put this in the css for the div , display: inline-flex; position: relative;

empty owl
#

oh fk

#

i didnt rea dthat

split nova
#

Im on phone one sec j be on pc

empty owl
#

just add

#

it back

digital ibex
#

i added it back

#

and it does this

empty owl
#

did u also add justify content space around

digital ibex
#

on the container?

empty owl
#

i mean

#

flex start

digital ibex
#

nope

#

i add flex: start; or something?

empty owl
#

wait

#

can I see ur header class

#

and the other two classes

digital ibex
#
      .header {
          display: flex;
          flex-direction: column;
        justify-content: flex-start;
          text-align: right;
          background-color: #8db3f0;
          height: 63px;
      }
      .b-name {
          float: left;
          margin-left: 6px;
          margin-top: 3px;
          font-weight: 600;
      }
      .position {
          font-size: 15px;
          font-weight: 200;
      }```
split nova
#

ok im back

empty owl
#

remove the margin-top:3px from b-name

digital ibex
#

kk

empty owl
#

wait

#

nvm

#

u can add it back

split nova
#

change display:flex; to display:inline-flex; on header

digital ibex
#

actually, this is too hard for me lol, its just gonna confused me.

empty owl
#

follow @split nova

digital ibex
#

thanks for the help both of u 2 btw

split nova
#

i can do it for u if u send me html files ill walk u through what i did aswell

digital ibex
#

because i need to add more stuff, its just gonna confuse me

empty owl
digital ibex
#

thanks :D, its fine tho

split nova
#

ah ok np then ๐Ÿ‘

digital ibex
#

thank

empty owl
#

@digital ibex if u ever need anymore help with css and flexbox this is a really good game to help

digital ibex
#

that game confuses the shit out of me

empty owl
#

lmao

dreamy cedar
#

Is there a way to create a category and a channel
And put the channel in that category with one command?

solemn latch
#

yes?

dreamy cedar
#

How

solemn latch
#

create the category, then create the channel inside the category

dreamy cedar
#

I did like that
It didnt detect the id of the category
I need to run the command again

solemn latch
#

creating a category is typically async.
meaning you have to await it finishing

astral yoke
#

how od i get rid of this (node:50) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 guildMembersChunk listeners added. Use emitter.setMaxListeners() to increase limit

exotic condor
#

So is this for VCs?

digital ibex
#

"11 guildMembersChunk" tf

#

you only need one

#

not 11 ffs

#

you've been twice already

#

me and some other person

#

then guildCreate

#

same logic

#

cool

split nova
#

๐Ÿ˜‚

digital ibex
#

how were u doing it?

#

iirc its a promise

#

just await it and it should work

celest schooner
#

wait wtf when did they change fields to make it look decent

earnest phoenix
#

can you use discord.js to get the message using a message link?

sudden geyser
#

yes

earnest phoenix
#

how? lol

sudden geyser
#

To my knowledge the message URL is like https://discord.com/channels/guild-id/channel-id/message-id

digital ibex
#

yeah

sudden geyser
#

So you'd just need to get the last part (message-id), which is the message ID.

earnest phoenix
#

ahhh

#

okay

sudden geyser
#

You can then fetch the message by its ID, but I think you'll also need the channel-id to specify which channel

digital ibex
#

u just need the message object

#

and <Message>.url

sudden geyser
#

I think they want to get a message by the url

digital ibex
#

ah

earnest phoenix
#

mhm

coarse topaz
#

Hello!
Is there a way to delete all the channels from a category with a command?
I'm developing my bot in Discord.js ^^
Example of the command: !deletechannels <CategoryID>

earnest phoenix
#

What discord.js are you on v12 or v11.5

sudden geyser
#

Yes, but imo that can get spammy if you have a lot of channels. You'd need to use <CategoryChannel>.children to get a collection of text & voice channels under the category to delete, and use a loop to call .delete on it.

coarse topaz
#

What discord.js are you on v12 or v11.5
v12 hehe ^^

earnest phoenix
#

No advice from me then ah

coarse topaz
#

@sudden geyser What do you mean with "spammy"?

#

It would only delete the channels GWseremePeepoThink

sudden geyser
#

You need to send an API request for each channel you want to delete, so if there are a lot of channels under the category (for example, 12), you may hit a rate limit.

coarse topaz
#

Oh

#

Alright, thank you for the info!

bright snow
#

!rank

#

How do I get fortnite bot acount

earnest phoenix
#

huh?

astral yoke
#

so how come for my visual studio code mongo connection, it works, but then for my vps it errors this (node:36) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connection <monitor> to the_ip closed

bright snow
#

I do I get a lobby bot

knotty steeple
#

no lmao

#

github pages are static

#

they just host html files

earnest phoenix
#

....

#

Can somebody answer meh question ๐Ÿ‘‰๐Ÿ‘ˆ

#

HOW DO YOU ADD BOTS INTO YOUR SERVER WHEN YOUR ON AN ANDROID PHONE

#

;-;

#

I NoObIe In DiScOrD KiNdA Lmaooo

pale vessel
#

yike

iron breach
pale vessel
#

try ctx.message.author.id

iron breach
#

mk

pale vessel
#

you're comparing the id to the object (i think it's called the same in python)

iron breach
#

didnt work

pale vessel
#

show code

iron breach
earnest phoenix
#

\๐Ÿ’ฉ

#
HI
#

||and hi||

pale vessel
#

isn't it ctx.author.id? @iron breach

iron breach
#

i mean you would think if its from a message it would be message.author

obtuse jolt
#

@iron breach assuming from my knowledge on nodejs (ik itโ€™s python) it seems that ctx.send = message.channel.send for me so wouldnโ€™t ctx.message.author = message.channel.message.author ?

#

which obviously wouldnโ€™t work

pale vessel
#

"message.channel.message.author" waitWhatSpin

obtuse jolt
#

read the whole thing

pale vessel
#

yeah

obtuse jolt
#

Jesus

pale vessel
#

what

astral yoke
#

lmao

pale vessel
#

your fever got worse

astral yoke
#

message.channel.message.author

#

what is wrong with your brain

#

what is not clicking

#

thats worse then a syntax error

pale vessel
#

that's not what they mean

obtuse jolt
#

IM EXPLANING SOMETHING NOT GIVING AN ANSWER

pale vessel
#

exactly

astral yoke
#

still kinda funny

#

not ok

#

bye

obtuse jolt
#

Hear me out here so if ctx.send is message.channel.send to me

using logic

ctx.message.author would = message.channel.message.author

#

Right?

earnest phoenix
#

alright

#

trying to make a bug command

iron breach
earnest phoenix
#

so it is supposed to send to a specified guild and channel

#

but it just dies

#
const Discord = require('discord.js')
const client = new Discord.Client();

exports.info = {
    aliases: []
}


exports.run = (client, message, args, tools) => {

    let botmessage = args.join(" ") 
    client.guilds.channels.cache.get('736417648560046201').send(botmessage);



}```
#

code^

#

its based on grabbing the server id

#

not server id

#

channel

obtuse jolt
#

so for me I would just be able to put message.author.id and it would do the same as what ever youโ€™re trying to do

earnest phoenix
#

i dont want it to send to me

obtuse jolt
#

If thatโ€™s how you do it

iron breach
#

that was first i tryed that had error cods

obtuse jolt
#

weโ€™re they different to what you have now?

#

@earnest phoenix why client.guilds.channels you can literally use client.channels.cache.get

#

tf

iron breach
#

i dont have error code now it just wont match my id and my id that i put

obtuse jolt
#

have you tried ===

#

?

earnest phoenix
#

i was experimentinggngngn

#

jesus

#

okay

obtuse jolt
#

Whatโ€™s wrong with your code

iron breach
#

im pretty sure === is the same as python ==

obtuse jolt
#

@earnest phoenix

#

idk but in js Iโ€™m pretty sure (donโ€™t quote me on it) == is the same as or similar and === is the same as

earnest phoenix
#

yeah

#

==

#

is

#

==

#

==

#

jesus

#

it is

#

===

#

i can't speak english

iron breach
#

== is the same as js ===

earnest phoenix
#

in js

obtuse jolt
#

ok so in my school school I made a login script sort of thing and yet theyโ€™re still giving me worksheets for printing shit

#

I fucking know how to print stuff to the console

#

holy crap

iron breach
#

xD

obtuse jolt
#

I want to lean javascript in school

#

not python

#

I donโ€™t get a choice

iron breach
#

i know more python than java but im trying to learn java

obtuse jolt
#

Iโ€™m self teaching myself javascript and learning python in school, I say self teaching but I learn stuff when I fix my code I donโ€™t actually do online courses

#

I do know how to code in js but I still have to look up some answers to stuff

iron breach
#

im more self taught than i learned in school so learning java will be easyer

#

to self teach

obtuse jolt
#

I also know some php

#

Enough to be able to make a dashboard

#

Very unoptimised dashboard

#

Itโ€™s a mess

iron breach
#

i knew alittle bit of HTML but forgot it

obtuse jolt
#

The only thing thatโ€™s optimised for fast operation is my nodejs bot

#

Which is

#

Really ducking fast

#

btw

#

when you execute a command it sends a message, pings the database then deletes the message, I kid you not sometimes it deletes it so fast the chat doesnโ€™t update in time and itโ€™s there for less then a second

#

and then you see the command output

sonic lodge
#

is there any native function in js for extracting the coefficient and exponent from a number given in scientific notation

#

like convert 1.2e+21 to {coeff: 1.2, exp: 21}

obtuse jolt
#

Isnโ€™t that a built in function in js

#

Iโ€™m pretty sure I saw that somewhere

sonic lodge
#

really?

obtuse jolt
sonic lodge
#

that isn't exactly what i'm looking for

#

i want to get the coefficient and exponent from the number represented in scientific notation

obtuse jolt
#

sorry but I actually do not know what those are you might be able to ask in a javascript server or ask on stackoverflow

#

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

earnest phoenix
rocky hearth
#

anyone discord commando expert here?? plz

obtuse jolt
#

go ask in the official discordjs server

#

It will be easier there @rocky hearth

earnest phoenix
#

I dmmed oily ;-;

#

ACCIDENTALLY PRESSED CALL ;-;

#

And left

obtuse jolt
#

You should call him see if he answers

earnest phoenix
#

...

#

Idk who he is..

obtuse jolt
#

a person

#

Like you

earnest phoenix
#

.

obtuse jolt
#

kek

rocky hearth
#

official server, invite code??

earnest phoenix
#

HE'S AN ALIEN

obtuse jolt
#

I ducking saw that

#

ghost pinger

#

why

#

@earnest phoenix

iron breach
#

@pale vessel i figured out the issue after a hr

astral yoke
#

anyone know why im getting this

#

(node:36) UnhandledPromiseRejectionWarning: MongoServerSelectionError: connection timed out

earnest phoenix
#

OOF

obtuse jolt
#

hmm idk man your connection couldโ€™ve timed out

#

Not 100% sure on that one

lime pumice
winter basalt
#

that is just discord

lime pumice
#

Oh

unique knoll
#

The max message option on my Discord.MessageCollector isn't working. What would be the appropriate way to make sure it closes out cleanly?

bright snow
#

!start

earnest phoenix
restive pebble
#

rip

astral yoke
#

lets not

pure lion
#

Okay I'm back and my server is back online

pale vessel
#

depends on what webserver you use i guess

#

create a file called 404.html

#

could also be markdown, your preference

#

should go in the root

#

can you give me the site url?

slate wave
#

I know this is probbably something dumb but I wanna finish before I fall asleep and my brain is turning to mush

#
  setInterval(function (){
    let now = Date.now()

    for (let i in bot.mutes){   
      let guild = bot.guilds.cache.get(bot.mutes[i].guild);
      let member = guild.members.cache.get(i)

      if(bot.mutes[i].end <= now){
        console.log("RemovingRole")
        let mutedRole = guild.roles.cache.find(role => role.name === "Muted")
        console.log(mutedRole)
        member.roles.remove(mutedRole)
      }
    }
  }, 5000)
#

Why wouldnt that remove the role

pale vessel
#

it's probably for jekyll, i'm not sure

slate wave
#

yeh

#

Theres only one muted role and the console.log shows that its retrieving the role correctly

prime sand
#

Why I m getting <property> of null inside constructor

#

Like

class X {
constructor() {
};
get task () {
this.live();
};

live() {
console.log("hii")
};
};

When I call (new X()).task
It throws cannot read property live of null.

slate wave
#

why would member.roles.remove(role) not remove the role and not error

earnest phoenix
#

add .catch(console.error) after member.roles.remove(role)

slate wave
#

Doesnt say anything

swift void
#

wait

#

youre removing a role from a member

slate wave
#

a guildmember

#

let member = guild.members.cache.get(i)

swift void
#

member.removeRole?

slate wave
#

no

#

Thats not a thing anymore is it

#

At least its not in the docs

golden condor
#

It's member.roles.remove or .cache.remove I'm not sure

pale vessel
#

roles#remove

golden condor
#

Ah alright

slate wave
#

Thats what I was using tho

golden condor
#

It's GuildMemberRoleManager#remove()

slate wave
#

yea but GuildMemberRoleManager is called through roles

golden condor
#

Yeah

slate wave
#

Then we are back to the question of why

  setInterval(function (){
    let now = Date.now()

    for (let i in bot.mutes){   
      let guild = bot.guilds.cache.get(bot.mutes[i].guild);
      let member = guild.members.cache.get(i)

      if(bot.mutes[i].end <= now){
        console.log("RemovingRole")
        let mutedRole = guild.roles.cache.find(role => role.name === "Muted")
        console.log(mutedRole)
        member.roles.remove(mutedRole)
      }
    }
  }, 5000)

wouldn't remove the role

pale vessel
#

are you sure mutedRole exists before removing it from the member

slate wave
#

Yes thats why I console.log()'ed it

golden condor
#

@slate wave if you do in it gives you the number in the array or the name in the object so you need to do bot.mutes[i].member I think

slate wave
#

Well bot.mutes is

{"444644760322572297":{"current":1595553014281,"end":1595553014281,"guild":"643323696693510154"}}
#

so bot.mutes[i].member would return undefined

#

Welp I just stumped all of us

fresh hatch
#

mongoose gang, where you at

#

@slate wave you use JSON for db?

slate wave
#

Yeae

#

Why?

earnest phoenix
#

don't

slate wave
#

Wut

vague imp
#

Lets say i mute someone for 2m the command will set unmute for 2m using setTimeout. but i unmute using unmute command and mute them for 5m. The 2m timeout will still be running. and it will unmute the user after 2min

#

how should i resolve this issue?

wary flame
#

Cancel the old timeout after unmute

vague imp
#

how

#

thats the issue

wary flame
#

What language

vague imp
#

js

slate wave
#

Or you could just use a database and check if the person needs to be unmuted every 5s with setInterval

#

And then the unmute command will remove the person from the database

vague imp
#

that would be waste of resources

#

checking every 5 sec

wary flame
#

You do var timeout = your timeout, then when someone unmutes you do clearTimeout(timeout)

vague imp
#

there must be a better way

slate wave
#

Well if you restart your bot then all ur mutes are kaput

jolly quail
#

Hmm after 2 mins u will run the unmute command right.. Just check at the start of unmute command if the person is muted or not

vague imp
#

for that i have reinit

wary flame
#

You do var timeout = your timeout, then when someone unmutes you do clearTimeout(timeout)
^

slate wave
#

Lol guess my problems never getting fixed, although at this point I don't think there is a fix

wary flame
#

It is probably better to do something like client.mutes[guilddid + userid] and store the timeout there

vague imp
#

hmm

jolly quail
#

Lets say i mute someone for 2m the command will set unmute for 2m using setTimeout. but i unmute using unmute command and mute them for 5m. The 2m timeout will still be running. and it will unmute the user after 2min
@vague imp I mean how is this a problem.. If unmute command at the end of 2 mins checks that user is muted or not ur issue is solved

slate wave
#

ItS a WaStE oF rEsOuRcEs

vague imp
#

hmm i can do it but the user will be muted for 5min

#

so the user will be muted

#

and it will unmute it in 2min

jolly quail
#

Huh

slate wave
#

Or set a cooldown

lusty quest
#

@fresh hatch you called?

pure lion
#

So if I had a server on port 6969 could I use it as a public ejs server?

#

If so then how?

wicked reef
#

How do you make the vote bot reward

restive furnace
woven sundial
#
bot.on("guildMemberAdd", function(member) {
    member.guild.fetchInvites().then(guildInvites => {
        const ei = invites[member.guild.id];
        invites[member.guild.id] = guildInvites;
        const invite = guildInvites.find(i => ei.get(i.code).uses < i.uses);
    const inviter = bot.users.get(invite.inviter.id);
})
})``` Returns me that uses is undefines... why ?
restive furnace
#

you havent defined uses

#

either it exists

earnest phoenix
#

consider not using JSON as your database

wicked reef
#

Mmh

#

Do you guys now hoe to make it so that if you vote for the bot you will get a reward

misty sigil
wicked reef
#

Ok

restive furnace
#

i already told you...

wicked reef
#

Sorry

#

Did not notice it

fresh hatch
#

JSON dbs will corrupt

restive furnace
#

depends how you parse the data

#

but still yeah, dont usenit

pure lion
#

Can I host an ejs website on port 6969

#

uWu

misty sigil
#

Yes probably

pure lion
#

Epic cool good good

vague imp
#
addModeration: function(guildID,userID,type,time){
        var mod;
        moderations.findOne({
            guild:guildID
        },(err,result)=>{
            if(err) throw err;
                result.moderations.push({
                    user:userID,
                    modtype:type,
                    time:time
                })
                
                result.save((err,result)=>{
                    if(err) throw err;
                    return(result);
                })              
        })
    },```
#

result return undefined

#

i tried different method

#

but so far nothing

#

console.log gives value

#

but return don't

#

it's mongoose

delicate shore
#

yo

prime sand
#

xD

#

But u shouldn't chat here .

delicate shore
#

i cannot remember bot name tho