#development

1 messages · Page 535 of 1

vague chasm
#

Will it only work when my pc is on?

quartz kindle
#

your bot is on your pc?

vague chasm
#

No

quartz kindle
#

then no, it will work as long as your bot works

#

you have to put your bot's ip address, not your pcs

vague chasm
#

What's my bot's ip address -_-

#

How do I get that?

quartz kindle
#

your server's ip address

#

is your bot hosted in a vps?

vague chasm
#

How do I get that?

#

No

#

A bot host

quartz kindle
#

where is it hosted then?

vague chasm
#

<deleted link>

#

I want a better host

#

The host uses VPS's

#

@quartz kindle

quartz kindle
#
The repl will be hosted with the following URLs:

https://REPL-NAME--USERNAME.repl.co
http://USERNAME.repl.co/REPL-NAME
http://REPL-NAME.USERNAME.repl.co```
vague chasm
#

Yea I have one of those links

quartz kindle
#

so thats what you use instead of ip address

vague chasm
#

kay

vague chasm
#

Not working

earnest phoenix
#

We need a better explanation than that to help you. Please explain what isn't working, any errors, etc.

#

Hello. How can i make a proxy server for lightshot

#

I need html

#

i have domain

vague chasm
earnest phoenix
#

then?

#

alright

#

what's your username and project name

vague chasm
earnest phoenix
#

mhm

vague chasm
#

Do I need to provide webhookServer?

earnest phoenix
#

i'm not sure about repl.it's configuration

quartz kindle
#

you have webhook running at http://0.0.0.0:5000/dblwebhook

earnest phoenix
#

but if you want to run it on an existing server at an existing port then yes

quartz kindle
#

so you need to set up your bot's edit page webhook URL to http://REPL-NAME.USERNAME.repl.co:5000/dblwebhook

vague chasm
#

Ok ty

#

Does the Test button vote the bot and unvote it?

#
dbl.webhook.on('vote', vote => {
  let g = client.guilds.get(501396018395480065)
  let c = g.channels.get(522420279352492049)
  let u = client.users.get(vote.user)
  let person;
  if (u) {
    person = u
  } else {
    person = 'User with ID ' + vote.user
  }
  c.send('${person} just voted!')
});``` This is not working when I press `Test` button
#

@quartz kindle

quartz kindle
#

idk what the test button does

vague chasm
#

It tests webhook

quartz kindle
#

if it doesnt work then either the url is wrong, or there is a firewall blocking it

#

you can try changing the port from 5000 to 8080 which is usually open by default

#

you can also setup a normal http server on port 5000 and try accessing it from your browser

#

just to make sure it works

vague chasm
#

Ok

quartz kindle
#

that means the dbl token is wrong, usually happens on the post stats part, not in the webhook

earnest phoenix
#

Hello @quartz kindle

#

are you online?

#

what should i set the dbl edit page webhook

#

(its glitch)

#

its not working

quartz kindle
#

if your webhook is listening on port 5000 then change it accordingly

vague chasm
earnest phoenix
quartz kindle
#

that means 8080 is already assigned/reserved to some other process, so you cant use it

#

yes, like that

earnest phoenix
quartz kindle
#

you can set anything you want there, as long as its the same on your webhook password code

earnest phoenix
#

okay

#

Its Not Working

#

its not working

#

shit

#

const dbl = new DBL(settings.dbltoken , { webhookPort: 5000, webhookAuth: "Mert1234"});

#

is it true?

quartz kindle
#

it should work, did you put Mert1234 on your bot's authorization? did you save it?

earnest phoenix
#

i saved

#

93% sure you don't need :5000

#

Mine doesn't

quartz kindle
#

i checked glitch's website, and it seems they only allow connections through port 3000

earnest phoenix
#

ok

#

i will test

quartz kindle
#

which is bound as port 80, so you dont need to specify the port

#

so make port 3000 in your webhook code, and just do glitch.me/dblwebhook in your bot's edit page

earnest phoenix
#

Yeah mine doesn't have port and works fine

#

I really just use glitch as a translation from DBL to discord anyway

#

      throw er; // Unhandled 'error' event

      ^


Error: listen EACCES 0.0.0.0:80

    at Server.setupListenHandle [as _listen2] (net.js:1343:19)

    at listenInCluster (net.js:1401:12)

    at Server.listen (net.js:1485:7)

    at DBLWebhook._startWebhook (/rbd/pnpm-volume/bddb906b-1c32-4abe-b698-c698c3664c98/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:45:18)

    at new DBLWebhook (/rbd/pnpm-volume/bddb906b-1c32-4abe-b698-c698c3664c98/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:27:12)

    at new DBLAPI (/rbd/pnpm-volume/bddb906b-1c32-4abe-b698-c698c3664c98/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/index.js:69:22)

at Object.<anonymous> (/app/Gamerbot.js:12:13)

    at Module._compile (module.js:653:30)

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

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

it gives that error

quartz kindle
#

with port 3000?

earnest phoenix
#

3000 and 80

quartz kindle
#

well, 80 yes, but 3000 should work

earnest phoenix
#

1 mins

#
const express = require('express');
const app = express();
app.get("/", (request, response) => {
  console.log(Date.now() + " Ping tamamdır.");
  process.exit(0)
  response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
  http.get(`http://gamert.glitch.me/`);
}, 280000);```
#

they are overlaping

quartz kindle
#

you already have a server running

#

so use the server you already have instead of creating a new one

#

check the webhooks docs, last example

earnest phoenix
#

okay

latent oasis
#

guys? can u made this in embedMessage
(im so stupid, and cant do this)

 if(command === "ping") {
    const m = await message.channel.send("Ping?");
    m.edit(`Pong! Latency is ${m.createdTimestamp - message.createdTimestamp}ms. API Latency is ${Math.round(client.ping)}ms`);
  }

without m.edit, just for knowing latency

earnest phoenix
#

what is the best way ti check if the user has a permission to use the bot

#

to not waste timr on algorithms

#

i told it to make the invite for me, and it gave this error

#

this is after i tried applying an invite manually and it said that i did not give any invite, when i had checked and definitely had

earnest phoenix
#

how do i make my ready.js file like twicth

const moment = require('moment');
const Discord = require('discord.js');
const ayarlar = require('../ayarlar.json');

var prefix = ayarlar.prefix;

module.exports = client => {

client.user.setGame("r!yardım | r!davet | Bagis icin RexSky#6133 | AnkSOFT.net");
 


    console.log(`Giriş Yapıldı!`);
  console.log(client.channels.size + ` Kanal - ` + client.guilds.size + ` Sunucu - ` + client.guilds.reduce((a, b) => a + b.memberCount, 0).toLocaleString() + ` Kullanıcı`); 
}```
#

like twitch?

#

Now .d

#

it just looks stylish

#

I don't understand what you're asking

#

what do you mean by Like twitch

#

I have a file of my size and I am using this file as part of it. how do i make it twicth

knotty steeple
#

wat

earnest phoenix
#

my point

#

@latent oasis I don't think so

#

Help pls !

#

We don't understand what you're requesting help for

#

@latent oasis you could make it edit in a differant server but that's very pointless I don't see why you don't want use edit

quartz kindle
#

based on his code, i think he's asking how to change bot's presence

earnest phoenix
#

why didn't he say that though

quartz kindle
#

"like twitch" -> playing/streaming

earnest phoenix
#

I'm so confused

quartz kindle
#

shows code about game presence with only console.log in it

earnest phoenix
#

just add , {type: "STREAMING"} between the end bracket of setting the presence

#

@earnest phoenix

#

eyw

#

Thank you

earnest phoenix
#
if (text === message.isMentioned(bot.users.get('483052460903104513'))) { 
  let niv = bot.users.get("279749525009334273").tag
  const embed = new Discord.RichEmbed()
.setColor("RANDOM")
.setDescription(`Hello! im Naknak Bot!
my prefix: \`${prefix}\`, my second prefix: \`@${bot.user.name}\`.
if you want me in your server type the command: \`${prefix}links\`(Invite me).
if you want get updates and more join to my server with the command: \`${prefix}links\`(Naknak Server).
if you want setup me type the command: \`${prefix}config\`.`)
.setFooter(`my creator: ${niv}`) 
  message.channel.send(embed);
}

why its not work?
no errors
in eval command it send

SyntaxError: Unexpected token <
quartz kindle
#

message.isMentioned returns true or false

#

if text is a string, then if (text === message.isMentioned will never pass

#

also, isMentioned accepts an ID, so you can just do isMentioned("id") instead of bot.users.get

earnest phoenix
#

guys how can i convert a string whicu containts units to integer

#

for example 2m to 120

#

you could check to see if theres a m h d or s in that argument then convert that

#

but idk

#

yes i cam di that

#

i want to know if theres any premade solution

#

cause i do not like that sort of things

#

its kinda messy

#

thats not it

#

oof

#

@earnest phoenix

#

!

raven bronze
#

my bot isnt working ._.

earnest phoenix
#

whats the error?

raven bronze
#

no error

node index.js

#

dosnt do anything

earnest phoenix
#

is that your bot

#

index.js?

raven bronze
#

ye

#

cd ~/Desktop/Gimbo
node index.js

earnest phoenix
#

have you logged the bot in with a valid token?

raven bronze
#

yes it was working a min ago

earnest phoenix
#

so no errors?

#

can you show me a screen shot of your index.js file

raven bronze
#
const botconfig = require("./botconfig.json");
const Discord = require("discord.js");

const bot = new Discord.Client({disableEveryone: true});

const client = new Discord.Client();

let prefix = botconfig.prefix;

let website = botconfig.website;

client.on("ready", async () => {
  console.log(`${bot.user.username} is now online!`);
  bot.user.setActivity(`${bot.guilds.size} Servers`, {type: 'WATCHING'});
});

client.on("message", async message => {
  if(message.author.bot) return;

  let prefix = botconfig.prefix;
  let messageArray = message.content.split(" ");
  let cmd = messageArray[0];
  let args = messageArray;
  let sender = message.author;
  let icon = message.author.displayAvatarURL;
  let boticon = bot.user.displayAvatarURL;

  if(cmd === `${prefix}help`){
    // Tell them to check DMs
    let help_pub = new Discord.RichEmbed()
    .setColor("#feca2e")
    .setTitle("Check your messages! 📬");
    message.channel.send(help_pub);
    console.log(`I sent a new message to ${sender}!`);
    // Send DM
    let help_dm = new Discord.RichEmbed()
    .setColor("#feca2e")
    .setTitle("This bot was made by @Tehcno#0001, we are still doing some work on the bot. Please allow us to continue to work on the bot.");
    message.author.send(help_dm);
  };

  if(cmd === `${prefix}update`) {
    let reply = new Discord.RichEmbed()
    .setColor("#feca2e")
    .setTitle("Gimbo is now up to date! 🤖");
    message.channel.send(reply);
    bot.user.setActivity(`${bot.guilds.size} Servers`, {type: 'WATCHING'});
    console.log(`I updatted my status!`);
  }

  if(cmd === `${prefix}icon`) {
    let reply = new Discord.RichEmbed()
    .setColor("#feca2e")
    .setTitle("Heres your avatar image! 📷");
    message.channel.send(reply);
    message.channel.send({
      file: message.author.displayAvatarURL + ".png" // Or replace with FileOptions object
    });
    console.log(`I sent ${sender} their profile icon!`);
  }

});

bot.login(botconfig.token);
earnest phoenix
#

for const bot = new Discord.Client({disableEveryone: true}); you don't need disable or Discord.

#

you can just do const bot = new Client();

#

or const client

#

I'm probably missing something but I can't see why it won't work

raven bronze
#
censored:Gimbo censored$ node index.js
/Users/censored/Desktop/Gimbo/index.js:4
const bot = new Client()
            ^

ReferenceError: Client is not defined
    at Object.<anonymous> (/Users/censored/Desktop/Gimbo/index.js:4:13)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
censored:Gimbo censored$ ```
earnest phoenix
#

have you tried just leaving it offline for a bit

#

okay hold on

velvet ruin
#

French ?

raven bronze
#

English

velvet ruin
#

Lock command ?

#

I dont know

#

For my bot discoed

#

Discord

#

In js

raven bronze
#

use // ?

velvet ruin
#

Yes

earnest phoenix
#

?

velvet ruin
#

My prefix

earnest phoenix
#

// adds a note

velvet ruin
#

Do you have lock and unlock command for my discord bot ?

inner jewel
#

@raven bronze ```js
const bot = new Discord.Client({disableEveryone: true});

const client = new Discord.Client();```

#

you register your events on client

#

but login on bot

#

they are two separate instances

#

you should have only one

velvet ruin
#

Do you have lock and unlock command for my discord bot ?

raven bronze
#

same error

earnest phoenix
#

what does disableEveryone actually do?

raven bronze
#

(me) > node index.js
(serv) >

inner jewel
#

prevents the bot from sending @ everyone or @ here

earnest phoenix
#

Oh?

#

I need that

velvet ruin
#

You don't have lock command ?

inner jewel
#

that's lib specific

raven bronze
#

ok, well im gonna restart my computer and see if that help

inner jewel
#

it won't

#

you should try understanding what your code does

raven bronze
#

guys it was working with the same code a min

velvet ruin
#

@inner jewel Do you have lock and unlock command for my discord bot ?

inner jewel
#

instead of copy pasting like you did

raven bronze
#

ago

inner jewel
#

@velvet ruin what

earnest phoenix
#

I could just check all the messages the bot sends and see if it conains @everyone or @here and if it does just dont send

inner jewel
#

your commands are your code

velvet ruin
#

The code o

#

For lock channel dans unlock

inner jewel
#

no one is going to spoonfeed you

velvet ruin
#

Send messages

inner jewel
#

read the docs of your library

#

on how to create/delete permission overrides

velvet ruin
#

Me shit in english 😐 french ?

#

Please send code

inner jewel
#

no

#

no one is going to give you code

velvet ruin
#

You don't have code ?

raven bronze
#

code 4 what

earnest phoenix
#

nobody is going to spoonfeed

velvet ruin
#

Do you have lock and unlock command for my discord bot ? @raven bronze

inner jewel
#

@velvet ruin stop asking for spoonfeeding and don't randomly ping

raven bronze
#
  1. Please dont tag me
  2. Also what will the command do?
velvet ruin
#

What ? Reverso in french please

raven bronze
#

egg!translate fr 1. Please dont tag me
2. Also what will the command do?

velvet ruin
#

French ?

raven bronze
#
  1. s'il vous plaît ne pas me taguer
  2. Aussi, que fera la commande?
inner jewel
velvet ruin
#

Mais je voudrais le lock pour fermer le salon

raven bronze
earnest phoenix
#

?

#

what with

raven bronze
#

my bot, just responds with " " when i do node index.js

velvet ruin
#

Reverso in fr

inner jewel
#

i already pointed the error in your code

raven bronze
#

fixed code - same issue

inner jewel
#

also this channel is english only, don't try to speak french here @velvet ruin

earnest phoenix
velvet ruin
#

Goodbye 😉 tomorrow

raven bronze
#

hm

#
new error:
events.js:173
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
    at Client.emit (events.js:171:17)
    at WebSocketConnection.onError (/Users/my-name-here/Desktop/Gimbo/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:374:17)
    at WebSocket.onError (/Users/my-name-here/Desktop/Gimbo/node_modules/ws/lib/event-target.js:128:16)
    at WebSocket.emit (events.js:182:13)
    at _receiver.cleanup (/Users/my-name-here/Desktop/Gimbo/node_modules/ws/lib/websocket.js:211:14)
    at Receiver.cleanup (/Users/my-name-here/Desktop/Gimbo/node_modules/ws/lib/receiver.js:557:13)
    at WebSocket.finalize (/Users/my-name-here/Desktop/Gimbo/node_modules/ws/lib/websocket.js:206:20)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)```
earnest phoenix
#
//Code
});```
raven bronze
#
bot/client.on('error' => {
              ^^^^^^^

SyntaxError: Unexpected string
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:656:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)```
earnest phoenix
#

you dont put the /

#

its either bot or client

raven bronze
#

which one tho?

earnest phoenix
#

which ether you chose

raven bronze
#
client.on('error' => {
          ^^^^^^^

SyntaxError: Unexpected string
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:656:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)```
earnest phoenix
#
client.on('error', err => {
console.log("Oof I messed up... " + err)
});```
raven bronze
#
node index.js

#

and

#

then " "

#

😦

earnest phoenix
#

idk there must be something wrong with your bot is in online when you do node index.js

raven bronze
#
  • not a word about light theme
fleet mason
earnest phoenix
#

light theme is bad

fleet mason
#

Trying not towaffleSweat waffleSweat waffleSweat

earnest phoenix
#

you can do js embed.setImage(msg.author.avatarURL)

fleet mason
#

Client.deleteUSer("used light theme"(

raven bronze
earnest phoenix
#

what have you done

raven bronze
#

hold on

#

OHHHHH

#

"website" isnt definied in botconfig.yml

#

nvm not the issue :/

#

Issue:
pc = false
code = true
var = false
commands = false
consts = false

earnest phoenix
#

im tired im going to sleep

#

night

raven bronze
#

i dont know what i did but i think i fixed it

desert bough
#

anyone know why my &setup command stopped working, it was working then people started reporting that it doesnt, i only allow myself and guild owners to do it i have this as a check and now it just shows this message even for me

if(message.author.id != message.guild.owner.id || "205440127361744897") return message.reply(`sorry, only the owner of ${message.guild.name} can setup this bot!`);
NodeJS btw

raven bronze
#

nvm it not working :/

late hill
#

You can't just put an id

#

After ||

#

Pretty sure

desert bough
#

it worked before but should i try taking it out?

late hill
#

As that would always return true

desert bough
late hill
#

No

desert bough
#

ok

#

something like this? if(message.author.id != message.guild.owner.id || message.author.id != "205440127361744897")

late hill
#

yes

desert bough
#

kk lemme try that

late hill
#

And you should use !==

desert bough
#

cheers

late hill
#

Instead of !=

desert bough
#

ok

#

any particular reason?

late hill
#

!== means it has to be the same type

#

Which in your case it will be

raven bronze
#

welp im just gonna restore my backup code :/

desert bough
#

ok

#

@late hill thanks

#

it works

raven bronze
#

@earnest phoenix I fixed it! don't know how though. $help now works 😃

autumn light
#

Erm

#

I require help

sick cloud
#

read that

thorn nexus
#

Hello, tell me how to make a delay in the teams, it is necessary that the command be executed 1 time in 1 minute, for each user separately

sick cloud
#

oh

#

i see

#

explain better then

thorn nexus
#

when a user writes a message, the command is executed. it is necessary that the command be executed once per minute, not more often

sick cloud
#

then make users only type it every minute

thorn nexus
#

this is not an option

#

I want to make a system of experience and levels, and it is necessary that the experience be charged for messages only once per minute

sick cloud
#

then do timing

#

when it happens, add a date to the users db record, and next time if the date compared is less than 1 minute dont do it

thorn nexus
#

thanks, apparently this option is the best

#

I wonder how it works in bot Mee6

vernal rivet
#

You can also look up tutorials on xp systems, a good one is from threebrow

earnest phoenix
#

OK

#

soo

#

i am trying to set up my Bots page so the box is grey and the text is white

#

but i get this

#

how do i fix

vernal rivet
#

You might need to be more specific on where I am looking for

earnest phoenix
#

u know the box

#

that u put HTML in

vernal rivet
#

Yes

earnest phoenix
#

i wanna set my colors in that box

#

not around it

#

how do i do it

vernal rivet
#

Have you worked with inline css before?

earnest phoenix
#

nope

#

this is my code

#

it sucks ass

#

😭

prime cliff
#

The best moderation bot

My code sucks ass

vernal rivet
#

In the head tag do <style></style> to make an css inline block

earnest phoenix
#

look in the text

#

style is there

west raptor
#

im p sure u dont need <!DOCTYPE html> and all that stuff

earnest phoenix
#

i have it

#

it says backround-color

#

do i just change that\

vernal rivet
#

Ok, you only need Background-color, color will not help you

earnest phoenix
#

ok

#

then how do i change it to the box

vernal rivet
#

Do you mean borders?

earnest phoenix
#

no

sick cloud
#

dont add body or head or any of the structuring

earnest phoenix
#

i want THAT BACKROUND black and the text white

sick cloud
#

also dont make dumb lies

prime cliff
#

Oh god green text on white background

earnest phoenix
#

wha dumb lies?

vernal rivet
#

-_-

earnest phoenix
#

i am trying to change it

sick cloud
#

"the best moderation bot out there"

earnest phoenix
#

😭

sick cloud
#

dont

earnest phoenix
#

well its there

vernal rivet
#

#ffffff is white

earnest phoenix
#

so

#

ik

#

but i want the BOX

sick cloud
#

i can assure its not

earnest phoenix
#

there

#

that help at all?

quartz kindle
#

you need to be specific in your css

#

and target the box not the body

vernal rivet
#

Yes

earnest phoenix
#

ok

quartz kindle
#

right click the page > inspect element

earnest phoenix
#

ok

quartz kindle
#

read the css structure on the right side

vernal rivet
#

Body is the whole thing, box is a section

quartz kindle
#

and apply css to what is there

earnest phoenix
#

ok

#

it says block

#

so do i target it to that?

vernal rivet
#

Block is a style I believe, I need to check

#

Yes it is

earnest phoenix
#

ok

#

then what is it

vernal rivet
#

Also this is in the iframe tag

earnest phoenix
#

ok

quartz kindle
#

you target the elements classes

earnest phoenix
#

so like

#

div

#

and stuff

vernal rivet
#

So it's displaying the iframe in block style

quartz kindle
#

for example body is everything. what is inside body? id=bots (#bots)

#

what is inside bots? class=container (.container)

#

so you go #bots .container .nextclass { your css here }

earnest phoenix
#

so i put my stuff in ther

quartz kindle
#

you need to specify the classes until you reach the desired one

earnest phoenix
#

ok

#

How do I change my bots status, and how do I find my discord guild? xD

knotty steeple
#
  1. what is that last question
#
  1. what library
earnest phoenix
#

And other

keen drift
#

i think it's pretty self explanatory

earnest phoenix
#

Clearly not for me

#

So care to explain?

#

I meant how to find the guild

inner jewel
#

a guild is a server

keen drift
earnest phoenix
#

I did add it to the server list

#

And when I put it in the thing

keen drift
#

then if you follow that, the server page has an id

earnest phoenix
#

It said •Invalidate Server Format

inner jewel
#

copy guild id

#

paste there

earnest phoenix
#

Ohhhh

#

I’m smart

#

Alright, next question, how do I change the status from the library ‘other’

keen drift
#

edit your bot

earnest phoenix
#

Mhm

vernal rivet
#

Yeet

sick cloud
#

how do you get a users status from users.fetch (djs master)?

#

it doesn't get provided

vernal rivet
#

Did you check the docs?

keen drift
#

keep forgetting that the weeb guy is tony

#

user.presence doesn't work?

west raptor
sick cloud
#

doesnt help

#

and yeah no

#

it provides a basic user

#
User {
  id: '296044953576931328',
  bot: false,
  username: 'ThatTonybo',
  discriminator: '0001',
  avatar: 'a_2afed7814983e81f57b7e23c0e8d776c',
  lastMessageID: null,
  lastMessageChannelID: null }
#

this

west raptor
#

h

#

uh

keen drift
#

that doesn't sound right Thonkang

#

@sick cloud try user.presence

#

not sure if getter is included in your obj dump

#

most of the prop on class is a getter, which simply is a func that gets it from another collection

sick cloud
#

oh

keen drift
#
  /**
   * The presence of this user
   * @type {Presence}
   * @readonly
   */
  get presence() {
    for (const guild of this.client.guilds.values()) {
      if (guild.presences.has(this.id)) return guild.presences.get(this.id);
    }
    return new Presence(this.client, { user: { id: this.id } });
  }
raven bronze
#

can someone help me
how do i do an or statment

if(cmd === `${prefix}sever` || `${prefix}info`) {
  // stuff here
}```
west raptor
#

@raven bronze Because you arnt actually checking if the command is {prefix}info, just checking a string (which will always return true)

#

you'd have to do something like

#
if (thing === thing || thing === thing){}```
raven bronze
#

ok

#

another question, how can split it into mutliple .js files

root
-> chat-commands
    -> moderation.js
    -> fun.js
     -> etc.
    -> webconnect-mysql.js
-> voice-commands
    -> music-player.js
    -> music-queue.js
    -> music-web.js
    -> music-link-mysql.js
quartz kindle
#

module.exports

raven bronze
#

i mean like in my index.js, what do i put

quartz kindle
#

require

#

index: ```js
var myfunction = require('function.js')

#

function.jsjs module.exports = function() { return "bla"; }

#

for example

raven bronze
#
var chat-commands = require('chat-commands/moderation.js')
#

@quartz kindle would that work ^

quartz kindle
#

for requiring yes

#

but you need to use exports in the file

raven bronze
#

im still very confused

quartz kindle
#

you cannot include multiple files just the way they are in js, unless you use eval

#

you need to prepare each file you want to include

#

to enable including and to specify what is going to be included

#

if you want to include a function from moderation.js in your index.js, you need to export the function in the first file, and require it in the second file

raven bronze
#

so i need to make a command-list.js file with all of the imports?

knotty steeple
#

what is this

misty pawn
#

Some people with decent knowledge about sparkjava here?
I want to set up, that /api shows a site of a html-file I made.
I tried it with staticFile.location(""); and the file is called api.html. The issue now is, that I can't get it with /api but with /api.html which I really don't want.
Anyone here knows if it is possible, to remove the .html from the link and show the content of the html-file?
@ me pls

quartz kindle
#

no, you just need to use module.exports in each file you want to include

#

show code @misty pawn

raven bronze
#

i dmed you

misty pawn
#
        Spark.port(2000);
        staticFiles.location("");
        staticFiles.registerMimeType("", "text/html");
        init();
#

Ignore the registerMimeType

quartz kindle
misty pawn
#

yup

quartz kindle
#

their docs show this

#
import static spark.Spark.*;

public class HelloWorld {
    public static void main(String[] args) {
        get("/hello", (req, res) -> "Hello World");
    }
}```
misty pawn
#

-_-

#

That's why I asked for help from someone with knowledge about sparkjava

quartz kindle
#

its just a router, all routers work the same

knotty steeple
#

thats weirdly familiar to express

quartz kindle
#

if you want to receive requests at /api create a get("/api", etc

knotty steeple
#

in the get function

quartz kindle
#

then route it to your html file

#

something like java get("/api", (req,res) -> res.body(your html file))

misty pawn
#

dude.....

quartz kindle
#

then you should know lol

earnest phoenix
#

Can someone help me

misty pawn
#

Not with staticFiles...

earnest phoenix
#

No clue what is wrong with my bot.

quartz kindle
#

you cant rename static files, you need to route them

earnest phoenix
#

I have no clue where it's originating

quartz kindle
#

or just rename the file itself and declare it as an html mime type

#

the file doesnt need to have .html to work like one

misty pawn
#

tried it, didn't work

wanton walrus
#

hi

earnest phoenix
#

I have no clue where it

wanton walrus
#

ook lemme see

earnest phoenix
#

is originating

misty pawn
#

That hi was fast thinkEyes

quartz kindle
wanton walrus
#

Ok well you are trying to perform an operation when the bot doesnt have perms

#

like sending a message even

#

if someone triggers a command in a channel if cant speak in, itll error

earnest phoenix
#

Yes, but it happens right when I turn on the bot

wanton walrus
earnest phoenix
#

and it duplicates

#

over and over

#

look at the error id

wanton walrus
#

Is it trying to do something in the message event?

earnest phoenix
#

158

wanton walrus
#

Send me what your message event is

earnest phoenix
#

wdym

#

I coded it along with another dev

wanton walrus
#

ok and

earnest phoenix
#

wdym message event

wanton walrus
#

oh god

#

is it a 1 file bot

earnest phoenix
#

no...

#

It's a massive file bot

wanton walrus
#

Ok - where you have client.on(message blah blah

#

thats the message event

earnest phoenix
#

I have no clue where he put it

#

would it be in the bot.js

fierce owl
#

Does anyone have some discord.js knowledge? I need help

bright spear
earnest phoenix
#

in a sec moose

fierce owl
#

Ight

bright spear
#

@fierce owl never ask to ask (in any server), always just ask your question

fierce owl
#

Ok then

#

So basically I have made this dev hub thing on my discord, And a member will advertise their creation and if it is pretty cool, I will promote it. I want to use !promote (Message ID) and have it be sent to the specific promote channel.

wanton walrus
#

Okay

#

I'm listening^^

fierce owl
#

I literally just copied and pasted it from my stackoverflow question

bright spear
#

smh

wanton walrus
#

Ok so I'm guessing it isnt working

#

?

bright spear
#

oh wait u mean u copied the code

#

or the question

wanton walrus
#

oh

earnest phoenix
#

Where would the client.on(message normally be

west raptor
#

what

#

anywhere ig?

earnest phoenix
#

shit

fierce owl
#

Ah what

earnest phoenix
#

cause I didn't make that stuff

#

I made commands

west raptor
#

lol

earnest phoenix
#

The other dev did the back work

#

And i keep getting tis

#

@west raptor

fierce owl
#

@bright spear what you say

west raptor
#

can you

#

scroll up

#

a

#

bit

earnest phoenix
#

yes

#

how much is a bit

#

cause it keeps creating new errors

#

every second

west raptor
#

kill it

#

then

#

show where the error starts

#

it might not look exactly like that

earnest phoenix
#

picture sending

west raptor
#

-bots @earnest phoenix

gilded plankBOT
#
Swifti#2050
Bots

@sour tide

west raptor
#

@sour tide

#

hm

#

what are you trying to do

earnest phoenix
#

nothing

#

Immediately

#

when I turn on the bot

#

those errors arise

west raptor
#

huh

earnest phoenix
#

and keep multiplying

west raptor
#

whats ur ready event

vernal rivet
#

What's the problem?

sick cloud
#

missing permissions

#

its trying to do somethig

#

but has no perms

keen drift
#

Whatever it's, it's not being catched

sick cloud
#

send messages, add roles, etc

earnest phoenix
#

yes but what something

#

would start

vernal rivet
#

Check to make sure you spelt the permission right

earnest phoenix
#

immediately when I turn it on

#

I swear i did panda

vernal rivet
#

What's the error?

west raptor
#

@earnest phoenix what's your ready event

earnest phoenix
#

i got no clue where to even find them

#

I wasn't the main dev

vernal rivet
#

Check your cmd that your running the bot

keen drift
#

Honestly it's such a vague error that node stack fails to capture correctly, judging from snekfetch being used, this is still djs v11 or stable

fierce owl
#

I need help

So basically I have made this dev hub thing on my discord, And a member will advertise their creation and if it is pretty cool, I will promote it. I want to use !promote (Message ID) and have it be sent to the specific promote channel.

keen drift
#

This could be an internal lib issue that was addressed in v12/master. But I'd start by catching all the async actions in your project

earnest phoenix
#

How would one do that? The other dev did most of the work, I just added commands

keen drift
#

Welp

#

better get other dev to do it

west raptor
#

try()catch(e){}

#

oops

#

try{}*

keen drift
#

a simple .catch will work

west raptor
#

true

keen drift
#

most djs actions are async or returns a promise

vernal rivet
#

Check line 215 position 16

#

What is that line?

west raptor
#

@vernal rivet thats from a module

keen drift
#

snekfetch, already replaced in master with something else

vernal rivet
#

Rip

keen drift
#

@fierce owl that inquiry is vague

fierce owl
#

what

west raptor
#

not enough info

fierce owl
#

ah

#

what do you need?

vernal rivet
#

This error usually means you spelt the permission wrong, or it does not have that permission allowed

keen drift
#

What are you sending to that specific promote channel, are you just cloning the message id's content

earnest phoenix
#

give me a moment

keen drift
#

Also something like promote !promote (Message ID) would probably require a channel argument with it

west raptor
#

@vernal rivet Incorrect spelling would throw a different error; the errors means the bot doesnt have x permission

fierce owl
#

im cloning the content and putting it into an embed then sending it to a specifc channel (promote channel)

earnest phoenix
#

@west raptor where would I put in the .catch

#

how would I implement it

west raptor
#

uhm

vernal rivet
#

Maybe, but it would return the type of permission, like post

keen drift
#

@fierce owl Depending what lib you are using

vernal rivet
#

Actually it's incorrect permission. From what I am seeing it's a decrepited, since there's the decrepited warning

fierce owl
#

You want an example of something @keen drift

vernal rivet
#

And it's a problem with not having a try and catch method

earnest phoenix
#

ello @west raptor

keen drift
#

Catch will help locate promise rejections

earnest phoenix
#

yes but how would I add that to it

bright spear
#

decrepited Thonk
u mean deprecated?

earnest phoenix
#

I'm a complete noob

#

the other dev inst on

#

isnt

keen drift
#

Deprecation warning is perfectly fine

#

You get that deprecation warning if you are on a node version prior to promise rejection being fatal

vernal rivet
#

Well, now I know

#

What was the command you made @earnest phoenix ?

keen drift
#

There's not really a good way to locate the item that's causing the missing permission problem, welcome to nodejs

vernal rivet
#

Yup

#

IDK if he is trying to overwrite permission, would it still give an error if he did it in the json formatting in the Js file?

keen drift
#

He just says it happens on startup, I doubt it's any commands that's executed

vernal rivet
#

Then would it be the problem of it unable to say something?

keen drift
#

That's assuming it says something on boot

#

¯_(ツ)_/¯

bright spear
#

wait promise rejection is fatal now?

#

since wot version

vernal rivet
#

If it does, can the fact that the permission prevents it from saying something return that error?

keen drift
#

@bright spear I don't think there's a release currently that makes it fatal

bright spear
#

k

keen drift
#

i'm going to predict v12 nodejs for fatal exit

bright spear
#

k i'll never update to 12

#

lol

keen drift
#

😛

#

your code should be handling rejection regardless

earnest phoenix
#

@vernal rivet bansync is the command I made

#

-bots @earnest phoenix

gilded plankBOT
#
Swifti#2050
Bots

@sour tide

earnest phoenix
#

bansync

#

is the command

vernal rivet
#

Can you describe what it supposed to do?

keen drift
#

kek, ban duh

vernal rivet
#

I know that

#

But sync

#

Bansync, it's not going to be like just normal ban

earnest phoenix
#

yes

#

It bans the user from all the servers you have admin in

#

so it syncs your bans

#

through out your servers

#

@vernal rivet

vernal rivet
#

Did the error started to happen when you added the command?

earnest phoenix
#

no

#

It happens when you turn on the bot

vernal rivet
#

Ok so what does your ready method supposed to do?

earnest phoenix
#

I didn't make it

#

where do I find the code?

vernal rivet
#

Ok, it should be in the main bot file

earnest phoenix
#

what would be some text it would have

#

so i can ctrl + f it

jagged birch
#

ready

earnest phoenix
#

👏

vernal rivet
#

It should be like ``bot.on('ready' async () ={

}``

earnest phoenix
#

k

vernal rivet
#

Or it's client.on

earnest phoenix
keen drift
#

you should fire whoever made that

vernal rivet
#

Yes

earnest phoenix
#

let me pastebin it

vernal rivet
#

Ok

earnest phoenix
#

there

bright spear
earnest phoenix
#

oh

#

well i mean it copied everything that was there

bright spear
#

but its usually down and u cant upload or see files

earnest phoenix
#

its up now

vernal rivet
#

It's good for now

bright spear
#

it was down earlier today tho

#

like an hour ago

vernal rivet
#

Not for me

keen drift
#

hooly shit

earnest phoenix
#

So what is wrong with the start up

vernal rivet
#

If it works, it works

keen drift
#

fire whoever made this b0t

vernal rivet
#

Yes

keen drift
#

my eyes

vernal rivet
#

Agreeable

bright spear
#

wait

#

what

#
if(command === `${prefix}btext` || command === `${prefix}btext`)```
#

am i missing something or are both the same

vernal rivet
#

0w0

#

Your right

bright spear
#

also ew single file bot

vernal rivet
#

Yeet

bright spear
#

use aclap a aclap framework aclap

earnest phoenix
#

can anyone find what's causing it

#

I cant

keen drift
#

no

#

it's too much bullshit to look for

west raptor
#

It's not single file

#

I think

earnest phoenix
#

no its not

bright spear
#

what is this then ```js
if(command === ${prefix}btext || command === ${prefix}btext) {

const what = args.join(' ')

const btext = what.replace(/[bg]/gi, ":b:")
message.channel.send(btext)

}```

vernal rivet
#

Tell your Dev to get in here so fishy can throw down the hammer

west raptor
#

i am

#

confusion

bright spear
#

and why are you telling urself to add ur own bot js console.log("Add your bot with this url: " + `https://discordapp.com/oauth2/authorize?client_id=${bot.user.id}&scope=bot&permissions=0` + "\n" + "\n")

earnest phoenix
#

he's in eu

west raptor
#

lol

earnest phoenix
#

because @bright spear

#

I added that in there

#

cause it's handy

#

if anyone asks me

bright spear
earnest phoenix
#

thanks haha

vernal rivet
#

If that's the case, then make a command for that link

earnest phoenix
#

I could do that

bright spear
#

i was being sarcastic but ok

keen drift
#

i'll give you $1 to delete that bot

earnest phoenix
#

Well If i did that

vernal rivet
#

It's a lot easier than it looks, and having it send to your console won't help the person who wants it, you have to go to your console to grab it

earnest phoenix
#

I would need someone to remake it

keen drift
#

good

#

better not be the same person

vernal rivet
#

Yes

earnest phoenix
#

Would you want to do it

bright spear
keen drift
#

no, pretty sure I can copy and paste together a better one

vernal rivet
#

Nope

earnest phoenix
#

exactly

keen drift
#

when luca's troll repo actually has a higher quality code than this

#

someone merge this to luca

earnest phoenix
#

who is that in luca's pfp?

keen drift
#

a kid in Oliy's basement

earnest phoenix
#

oh damn

#

fbi

#

so in that code

#

is there something i can put in there

#

to help find the problem

earnest phoenix
#

@west raptor how do I add .catch

bright spear
#
  1. stop mentioning people
#

..

#

seriously?

#

deleted the message?

#

ghost pings are the worst

earnest phoenix
#

What?

#

I didn't delete anything

bright spear
#

surrreee

west raptor
#

huh

#

why are you asking me

bright spear
#

nice try

earnest phoenix
#

wast me

#

wasnt

earnest phoenix
#

wasnt me

west raptor
#

please stop lying

earnest phoenix
#

haha take da joke

west raptor
#

it's getting you nowhere

earnest phoenix
#

You said it yourself

#

👏

fierce owl
#

im having an issue with my promote command. It puts commas where there should be spaces when it sends the embed
if (message.content.startsWith('!promote')) { let args = message.content.split(" ") args.shift() let target = message.mentions.members.first(), id = args; const embed = ({embed: { color: 3447003, fields: [{ name: "**Promoted Server**", value: ${id} }, ], } }); message.client.channels.get("522572491969921026").send(embed) } })

and when i do !promote example message thing it sends example,message,thing

#

Someone help?

bright spear
#

id = args;

fierce owl
#

yeah

bright spear
#

try making it id = args.join(' ')

#

also use a real codeblock (```) pls

#

```js
code
```

west raptor
#

@earnest phoenix This isn't the place to shitpost

fierce owl
#

lol

earnest phoenix
#

👍

fierce owl
#

it still sends the same thing with commas instead of spaces

#

@bright spear

bright spear
#

did you put the space between ' '

fierce owl
#

yes

#

ello?

bright spear
earnest phoenix
#

Where do I add the catch thing

#

🤔

slim heart
#

Well where’s it telling you to add it

earnest phoenix
#

No where

#

I just keep getting errors right when I start the bot

slim heart
#

So then why do you need to “add the catch thing”

earnest phoenix
#

So i want to try and narrow down what the error is

#

and I got a suggestion to add .catch

slim heart
#

Oh well that doesn’t mean u need catch it means there’s something wrong with the code

earnest phoenix
#

The error is very vague

bright spear
#

what is it

bright spear
#

also its easier to read if you use syntax highlighting

#

```js

earnest phoenix
#

alright

#

here

bright spear
#

also that error is obvious

#

it doesnt have permission to do something in discord

earnest phoenix
#
bot.on('ready', async() => {
    var text = gamename
    var values = {
        servers: bot.guilds.size
    }
    var games = text.replace(/\{\{([^}]+)\}\}/g, function(i, match) {
        return values[match]
    });
    var datetoday = new Date()
    var days = datetoday.getDate()
    var month = datetoday.getMonth() + 1
    var year = datetoday.getFullYear()
    var time1 = datetoday.getSeconds()
    var time2 = datetoday.getHours()
    var time3 = datetoday.getMinutes()
fs.writeFile('./botstart.txt', days + "." + month + "." + year + " \n" + time2 + ":" + time3 + ":" + time1, function(err) {
        console.log("Logged in as  " + bot.user.username + "#" + bot.user.discriminator + "\n" + "\n")
        console.log("Server Count: " + bot.guilds.size + "\n" + "\n")
        console.log("Prefix: " + settings.prefix + "\n" + "\n")
        console.log("Add your bot with this url: " + `https://discordapp.com/oauth2/authorize?client_id=${bot.user.id}&scope=bot&permissions=0` + "\n" + "\n")
        console.log("Created by Swift#2050")
bot.user.setPresence({ game: { name: games, type: 0 } });
bot.user.setStatus(settings.status)
const snek = require("snekfetch");
muscii(bot)
});
});```
#

Yes advaith, but the bot does that immidiately on startup

slim heart
#

its from muscii?

earnest phoenix
#

and I got no clue what's happening

slim heart
#

because nothing else is requiring discord

#

that could cause a missing permission error

#

i believe

earnest phoenix
#

Hmm

#

So how would I fix that?

slim heart
#

well

#

whatever muscii is

#

fix that

#

idk

earnest phoenix
#

i have no clue, the other dev did that.

slim heart
#

@bright spear im right? right

#

what other dev

earnest phoenix
#

The other one on my team

#

he is eu so he is asleep

slim heart
#

then go talk to him when he wakes up

earnest phoenix
#

that's why I'm here

#

The thing is, he doesn't know what's causing it either

slim heart
#

that's a problem with his code if you don't understand it we arent gonna walk you through a useless process

#

it'll still work for the time being though

#

its only a temporary error

#

it doesnt crash

earnest phoenix
#

right, but it floods the console

slim heart
#

ok well if he doesnt know hes quite a bad djs developer

#

because im 15 and could tell you whats causing that if i saw the code

earnest phoenix
#

is there a way I can have it not send that error request to the console?

slim heart
#

you're trying to send/delete/do something with discord that the bot doesnt have permissions for

earnest phoenix
#

Like stop the bot from logging those types of errors?

slim heart
#

do a check for permissions and if the bot doesnt have the permissions required in message.guild then return;

earnest phoenix
#

it has all the permissions

slim heart
#

is it in this server

#

-bots @earnest phoenix

gilded plankBOT
#
Swifti#2050
Bots

@sour tide

earnest phoenix
#

yes

inner jewel
#

a fix would be to check permissions before doing discord api requests

slim heart
#

so then thats probably it

#

but yeah

earnest phoenix
#

how can I make it leave this server

slim heart
#

what hashire said and what i said before make sure it has permissions each time

inner jewel
#

guild.leave()

#

but it's not guaranteed to have permissions in all guilds

slim heart
#

^

earnest phoenix
#

true

inner jewel
#

so manually leaving isn't a solution

slim heart
#

it should be covered anyways

inner jewel
#

and leaving on no permissions would just make you lose guilds

earnest phoenix
#

Is there a way where I can not make it not send that error to the console?

#

instead of fixing it

#

so it doesn't flood

slim heart
#

just on message event do
if(!message.guild.members.get(client.user.id).hasPermission("WHATEVER_PERMISSION_YOU_NEED")) return;

#

probably a better way of doing that

earnest phoenix
#

I didn't make this remember, nor do I know much about node.js in the first place

slim heart
#

but this problem is about as stupid as that answer so thats what cha get

earnest phoenix
#

where would i insert that?

#

Sorry im such a noob

slim heart
#

in the message event

earnest phoenix
#

where would that be

#

🤦

slim heart
inner jewel
#

iirc

slim heart
#

if thats true thanks sm because ive needed a shortcut for kajillion years lol

inner jewel
slim heart
#

yeah it does

#

thats great lol, thanks

earnest phoenix
#

alright

uneven rover
#
['uncaughtException', 'unhandledRejection'].forEach(err => {
    process.on(err, function (reason) {
        //console.log(`${err}: ${reason}`);
        //process.exit(0);
    })
})```
earnest phoenix
#

what file is the message event normally in

slim heart
#

i was literally just lookin around for it before u said that i think im blind but yeah

uneven rover
#

hope that helps

slim heart
#

Syntax dw about it

#

he just needs to prevent the error from happening in the first place

earnest phoenix
#

wait syntax

#

what does that do?

#

Like send a detailed log?

slim heart
#

its a "handler"

#

but you shouldnt need that

inner jewel
#

that ignores any unhandled errors

#

which is a horrible practice

slim heart
#

you should be addressing the issue not saying screw it let me just ignore it

earnest phoenix
#

hm

uneven rover
#

"Is there a way where I can not make it not send that error to the console?"

earnest phoenix
#

^

slim heart
#

Syntax thats not his problem really

earnest phoenix
#

I have no clue how to handle it until the other dev comes online

slim heart
#

he thinks it is

#

but he should be stopping the error from happening not just making the program ignore it

uneven rover
#

yes, but obviously he doesn't understand his code

inner jewel
#

add .catch to promises

earnest phoenix
#

I have no clue

#

where any

#

of this can be added

#

would it be in the main bot.js file?

slim heart
#

wherever the client.on('message' event is

earnest phoenix
#
bot.on('message', message => {
    if(message.author.bot) return;
    if(message.channel.type === "dm") return;
    let messageArray = message.content.split(" ");
    let command = messageArray[0];
    let args = messageArray.slice(1);
    const mentionprefix = message.guild.member(botID).toString() 
    fs.readFile(`./blacklisted/${message.author.id}/black.txt`, function(err, data) {
        if(data === "true") return;
        if(err) {
           
            if(message.content.startsWith(prefix)) {
                var dir = `./usagelogs/${message.guild.id}`;
                
                if (!fs.existsSync(dir)){
                    fs.mkdirSync(dir);
                   }
                   const fuck = new Date()
                   const nowdate = fuck.getDate()
                   const nowdate2 = fuck.getMonth() + 1
                   const nowdate3 = fuck.getFullYear()
                   const minute1 = fuck.getHours()
                   const minute2 = fuck.getMinutes()
                   const minute3 = fuck.getSeconds()
                fs.appendFile(`./usagelogs/${message.guild.id}/logs.txt`, "\n" + nowdate + "." + nowdate2 + "." + nowdate3 + " " + minute1 + ":" + minute2 + ":" + minute3 + " " + message.author.id + " " + message.author.username + "#" + message.author.discriminator + ":: " +  message.content, function(err) {

                });
            }```
#

it's bot not client

#

that's where I got confused

#

so can you take that, add the new thingy to it, then send it back so i can add it to the bot?

slim heart
#

oh ok

#

at the very top just put if(!message.guild.me.hasPermission('MANAGE_MESSAGES')) return

earnest phoenix
#

alright

slim heart
#

like underneath bot.on

wise cradle
#

yikes, ever heard of json?

slim heart
#

but above everything else

#

lol yeah by brain is hurting

earnest phoenix
#

well it stopped happening

#

dope JPB

#

Sorry im such a noob guys

#

🤦

wise cradle
#

and also the messageArray is useless because message gets outputted in an array

slim heart
#

Zua he has no idea what his code actually is

earnest phoenix
#

yeah the other dev made it

inner jewel
#

keep in mind that will make the bot completely ignore any channels it doesn't have manage messages permission

earnest phoenix
#

I've only used python before

slim heart
#

he has a different developer hes not the one to complain to lul

#

Yeah

earnest phoenix
#

Alright

slim heart
#

I'm assuming however that it's deleting messages somewhere

#

so

earnest phoenix
#

that's wack

#

I just made the bot public today

#

and for some reason it already has 30 guilds

#

so probably some kid tried the >>delmsg 2010291321 command

#

and didn't give the bot perms

#

and It just tried to pickup where it left off

slim heart
#

thats quite a way to address your bot's users....

earnest phoenix
#

I call everyone kid

#

dw

#

I myself am a kid

inner jewel
#

apparently d.js had a method of finding the source of those promise rejections

#

¯_(ツ)_/¯

slim heart
#

(╯°□°)╯︵ ┻━┻

#

but why

#

thatd be so nice

#

"so here's the plan guys. the stack isnt displaying correctly, so we have to fix it!
Guy 1: Let's find out how we display it correctly
Guy 2: I agree with guy 1
Guy Idiot: Let's just get rid of it cuz like y not

Guy idiot it is! Guy 1 and Guy 2 you're fired."

raven bronze
#

Can anyone help me find a better prefix than $, because way to many bots use that one.

last ferry
#

bash your head on your keyboard and pick whatever is first

#

holding shift helps too cause you get symbols

inner jewel
#

<@bot id>

#

guaranteed to be unique

uneven rover
#

$

last ferry
#

true you could make your bot only mentionable but tahts kinda toxic

raven bronze
#

how come when i tried to bash my head on my keyboard i got nothing but a hurting nose? has anyone else found that bug?

slim heart
#

no you should report it

last ferry
#

here lemme show you how to get a prefix

#

*(Y)T GFTFDS

uneven rover
last ferry
#

there my prefix is *

#

easy

slim heart
#

tehcno

#

you should like add something before or after the $

last ferry
#

another dollar sign mmLol

slim heart
#

like ..$ or $> or $.. or >$ or maybe like $% even >$$

bright spear
#

[]{}#%^*+=_|~<>$€£·.,?!'

#

Best prefix

raven bronze
#

$$ is taken

last ferry
#

just have it be customizeable

#

infinite prefixes

#

ez

raven bronze
#

[]{}#%^*+=_|~<>$€£·.,?!avatar

#

[]{}#%^*+=_|~<>$€£·.,?!icon

inner jewel
#

!prefix '); drop table prefixes; --

raven bronze
#

[]{}#%^*+=_|~<>$€£·.,?!help

inner jewel
raven bronze
#

@bright spear thanks for the advice, try []{}#%^*+=_|~<>$€£·.,?!help in #commands

earnest phoenix
#

the best prefix is >>

#

handsdown

#

No it’s

#

7363837384

last ferry
#

no that prefix is for dum heads

slim heart
#

best prefix is