#development

1 messages · Page 1030 of 1

honest perch
#

Mhm

golden condor
#

As that only allows a certain amount of usage per day

honest perch
#

Wait

#

Do yoy mean searching or playing music?

golden condor
#

Searching

#

Playing I can do with other things

honest perch
#

Usually the yt api key is used

golden condor
#

I could use multiple API keys?

honest perch
#

What is the max usage on it?

golden condor
#

Like 10k per day quota but it runs out very quickly

#

10,000 units sorry

honest perch
#

I guess you could cycle keys but good would get annoyed

#

Google*

golden condor
#

What would be the problem with that?

honest perch
#

Check their tos

golden condor
#

I could use ytdl's get basic info

#

Since I keep getting rate limited with lavalink

#

And yt-search

#

I might just move music back to what I had before

tight plinth
modest maple
#

yes?

#

#text {
  // what ever
}```
earnest phoenix
tight plinth
#

hm

#

im rly shit with css

modest maple
#

i sense copy pasted code

onyx karma
#

i sense bad code

modest maple
#

@tight plinth do u wanna edit the text or just change the style?

onyx karma
#

it stinks

modest maple
#

i should of asked that earlier

tight plinth
#

actually both

earnest phoenix
#

i sense bad code
@onyx karma ;-;

modest maple
#

change style tickYes
Edit the text tickNo

#

unless u wanna redo the entire page's css and html lol

delicate shore
#
let muteRole = client.guilds.cache.get(msg.guild.id).roles.cache.find('name', 'muted');```
tight plinth
#

oof

pale vessel
spare mirage
#

@delicate shore ?

modest maple
delicate shore
#
at Client.<anonymous> (/app/index.js:830:56)
    at Client.emit (events.js:196:13)
    at MessageCreateAction.handle (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
    at WebSocketShard.onPacket (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
    at WebSocketShard.onMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
    at WebSocket.onMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/node_modules/ws/lib/event-target.js:125:16)
    at WebSocket.emit (events.js:196:13)
    at Receiver.receiverOnMessage (/rbd/pnpm-volume/38b33121-f779-43cc-a95d-c99a7cf7a9d4/node_modules/discord.js/node_modules/ws/lib/websocket.js:800:20)
(node:23194) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23194) [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.```
#

my error

modest maple
#

holy fuck dude

#

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of undefined

delicate shore
#

yes

spare mirage
#

thats enough ^

delicate shore
#

ok

modest maple
#

read the error?

delicate shore
#

but what's wrong

#

why cannot it read

modest maple
#

'roles' of undefined

#

undefined

delicate shore
#

hmm

pale vessel
spare mirage
#

let muterole = message.guild.roles.cache.find(role => role.name === 'muted');

modest maple
#

undefined

delicate shore
#

i did

#

bruh

tight plinth
#

interesting

delicate shore
#

let muterole = message.guild.roles.cache.find(role => role.name === 'muted');
@spare mirage this is what i use

tight plinth
#

but yea thats not what i wanted

spare mirage
#

🤦‍♂️ check if u have the role muted else make one

delicate shore
#

i have

regal raven
#

Can I add multiple images in a single embed?

#

I just want to know

delicate shore
#

@solemn latch my bot says I cannot find a mute role. Make sure its named as Muted

spare mirage
#

is ur role named

#

muted

delicate shore
#

@solemn latch can this work var role = msg.guild.roles.cache.find(r => r.name === 'Muted' || 'muted' || 'timeout' || 'Timeout'); member.roles.add(role);

spare mirage
#

or Muted

delicate shore
#

i have various

#

justii can it work like that

pale vessel
#

@delicate shore no

delicate shore
#

o

#

ohoho

#

then

earnest phoenix
pale vessel
#

just role => ["muted", "timeout"].includes(role.name.toLowerCase())

delicate shore
#

@pale vessel do i have to find it

#

with

#

first line of code

pale vessel
#

yeah

#

that's the function

delicate shore
#

so

#

it will be

earnest phoenix
#

so can someoen help with my error?

delicate shore
#
var role = msg.guild.roles.cache.find(["muted", "timeout"].includes(role.name.toLowerCase()));``` @pale vessel
pale vessel
#

no

#

you forgot the function

#

find(x => x...)

delicate shore
#

ok

#

i am confusion

earnest phoenix
#

im in byethost and i get this error?

pale vessel
earnest phoenix
pale vessel
#

did you copy paste

#

oh gosh

delicate shore
#

copy paste what

#

the code?

#

i watched tutorial

pale vessel
#

where is the function

delicate shore
#

hmm

pale vessel
delicate shore
#

var role = msg.guild.roles.cache.find(r =>["muted", "timeout"].includes(role.name.toLowerCase()));```
tight plinth
pale vessel
#

you set it to r then change role to r

pure lion
#

Why are you trying to find a role object in an array of strings?

pale vessel
#

😩

#

it's a condition

earnest phoenix
#

can someoen please help me 😦

delicate shore
#

ok

#

so

pure lion
#

Sure

tight plinth
#

Why are you trying to find a role object in an array of strings?
@pure lion he is trying to find a role name lol

delicate shore
#

my brain is gonna blast

pure lion
#

Just don't ask just ask

delicate shore
#

i gotta breath

pure lion
#

@earnest phoenix

delicate shore
#
var r = msg.guild.roles.cache.find(r =>["muted", "timeout"].includes(role.name.toLowerCase()));```
#

like this ? @pale vessel

pure lion
#

You're looking for the name of a role right?

delicate shore
#

ys

#

s

pure lion
#

r is the role object placeholder

delicate shore
#

oh

pure lion
#

r => r.{property}

delicate shore
#

o

pale vessel
#

i gave you an example, that doesn't mean you should just copy and paste it

spare mirage
#

message.guild.roles.cache.find(role => role.name === 'muted')

pure lion
#

:o

#

Why don't you

delicate shore
#

i tried

#

but never worked

pure lion
#

And?

#

Error

#

¿

delicate shore
#

it says cannot find role muyted

#

muted

#

but it is there

pure lion
#

Well then there's no role called muted

delicate shore
#

so

#

¯_(ツ)_/¯

#

i have

#

a role called Muted

#

@pure lion

pure lion
#

It's case sensative

delicate shore
#

ik

restive furnace
delicate shore
#

i have done lke that

#

@pure lion it's case sensetive

pure lion
#

Ik

delicate shore
#

i mean yes it's same

#

it's called Muted

#

and

pure lion
#

So are you looking for a role named 'Muted' or 'muted'

delicate shore
#

Muted

spare mirage
#

🤦‍♂️

delicate shore
#

@spare mirage ?
?
?

spare mirage
#

HASTEBIn

delicate shore
#

brvh

spare mirage
#

perms are messed p lol

delicate shore
#

ok

#

@spare mirage

spare mirage
#

stop pinging me

delicate shore
#

ok

#

ń

#

õ

#

ok

#

boeing

restive pebble
#

ok

#

what is the error

pale vessel
#

#

wtf

restive pebble
#

yes

spare mirage
#

dont use message.content

pale vessel
#

.setAuthor(‘message.guild.avatarURL()’, ‘message.guild.name()’) where the hell did you get this code

spare mirage
#

cuz if u do

#

hakshdkja!test it will still work

restive pebble
#

lol

cinder patio
#

that won't work lol

regal raven
pale vessel
#
  1. you can't use as quotes
  2. you're not supposed to surround the code with quotes
#
  1. name is not a function
delicate shore
#

what is the error
@restive pebble it keeps on saying cannot find. muted role

pale vessel
#

yes

#

please fix your code first

#

it's really bad

restive pebble
#

Ok

pale vessel
earnest phoenix
#

can someone help me make a coin system with MongoDB not mongoose?

pale vessel
#

and guild does not have avatarURL

#
  1. name is not a function
    @pale vessel read
#

iconURL(), read docs

restive pebble
#

@delicate shore role.toLowerCase()

delicate shore
#

no

#

in my server

restive pebble
#

Or it can also mean there is no such roles

delicate shore
#

role name is Muted only

#

there is

restive pebble
#

Use id then

pale vessel
#

@pale vessel read
@pale vessel READ

#

sorry but i just can't

earnest phoenix
spare mirage
#

bruh

#

do that in indexjs
bot.on('ready', () =>{

bot.user.setPresence({ activity: { name: 'Im not idle I just like the yellow color' }, status: 'idle' })

});

pale vessel
#

what are you doing, his code is correct

earnest phoenix
#

Display members it's watching over ( the bot ).

#
Error: Cannot find module './commands/Animals'
2020-07-07T09:16:48.940871+00:00 app[worker.1]: Require stack:
2020-07-07T09:16:48.940872+00:00 app[worker.1]: - /app/Index.js
2020-07-07T09:16:48.940872+00:00 app[worker.1]:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
2020-07-07T09:16:48.940872+00:00 app[worker.1]:     at Function.Module._load (internal/modules/cjs/loader.js:842:27)
2020-07-07T09:16:48.940873+00:00 app[worker.1]:     at Module.require (internal/modules/cjs/loader.js:1026:19)
2020-07-07T09:16:48.940873+00:00 app[worker.1]:     at require (internal/modules/cjs/helpers.js:72:18)
2020-07-07T09:16:48.940874+00:00 app[worker.1]:     at /app/Index.js:25:18
2020-07-07T09:16:48.940874+00:00 app[worker.1]:     at Array.forEach (<anonymous>)
2020-07-07T09:16:48.940874+00:00 app[worker.1]:     at /app/Index.js:24:9
2020-07-07T09:16:48.940874+00:00 app[worker.1]:     at FSReqCallback.oncomplete (fs.js:155:23) {
2020-07-07T09:16:48.940875+00:00 app[worker.1]:   code: 'MODULE_NOT_FOUND',
2020-07-07T09:16:48.940876+00:00 app[worker.1]:   requireStack: [ '/app/Index.js' ]
2020-07-07T09:16:48.940876+00:00 app[worker.1]: }
``` uhh help
pale vessel
#

Display members it's watching over ( the bot ).
@earnest phoenix did you get an error? what happened?

earnest phoenix
pale vessel
#

you defined it as client

tight plinth
#

@earnest phoenix woops, you can't import folders with require

earnest phoenix
#

So define it as activity or? @pale vessel

pale vessel
#

????????????

#

client is bot

earnest phoenix
#
fs.readdir("./commands/", (err, files) => {
  files.forEach(f => {
    const file = require("./commands/" + f);
    if (!file.name) throw f + "does not export a name property!";

    bot.commands.set(file.name, file);
    if (file.aliases && Array.isArray(file.aliases))
      file.aliases.forEach(a => bot.aliases.set(a, file.name));
  });
});
``` my command handler and error [#development message](/guild/264445053596991498/channel/272764566411149314/)
#

Ahhhhhhhhhh

#

Got you lol

tight plinth
#

shwo your directory tree

earnest phoenix
#

@pale vessel It should be?.

pale vessel
#

you can just change it

earnest phoenix
#

Mhm, got you.

#

Cheers, fixed and sorted @pale vessel

delicate shore
#

Use id then
@restive pebble no

#

i cannot

#

because it's a public bo

#

and id is differenr

restive pebble
#

Hmmm

#

Id works?

delicate shore
#

no

#

not trie

earnest phoenix
tight plinth
#

remove the folder lol

earnest phoenix
#

no

#

i dont want to

#

i want them to be oginsied

#

orginised

spare mirage
#

bruh why you can also change the file names to
MODERATION BAN.js
MODERATION KICK.js
to have them sorted @earnest phoenix

earnest phoenix
#

no

spare mirage
#

yes u can

tight plinth
#

fs is checking for Animals, and crashes coz its not a file

#

just move the file away from this folder

spare mirage
#

ypu have to check for the folder animals and then check for js files

earnest phoenix
#

just move the file away from this folder
@tight plinth no i dont want to tho i want to be orginised

tight plinth
#

well youre basiclly forced to move the folder lol

spare mirage
#

brtuh

#

wait but

#

all ur files

#

are already organised

#

on alphabetic order

#

:3

earnest phoenix
#

no

#

in folders smh

spare mirage
#

well

#

Just create more folders

#

in the bot folder

#

and run those

#

folders

#

folder

#

lol

earnest phoenix
#

?

#

tf

spare mirage
#

u have ur bot folder

#

with the indexjs

#

and all that stuff

#

in there make folders

#

FUN COMMANDS

earnest phoenix
#

no

spare mirage
#

MODERATION

#

ur basically forced too lmao]

earnest phoenix
#

stfu

lusty quest
#

@spare mirage why does is he forced to do so?

spare mirage
#

thats way easier then making a commands folder with more folders and more folddrfess

#

s

lusty quest
#

why? there are mutiple ways to tide up the entrie thing. one way is a Mainfolder for the commands and inside of this subfolder for categories

plush oar
#

Ye

earnest phoenix
#

why? there are mutiple ways to tide up the entrie thing. one way is a Mainfolder for the commands and inside of this subfolder for categories
@lusty quest exactly im trying to do category things like /commands/Animals/

lusty quest
#

@plush oar i think your counter is not updating

plush oar
#

Wdym

#

Oh yeah

lusty quest
#

both messages show 29 users

plush oar
#

It is

#

Cus we got 29 users

lusty quest
#

yes but 29-1 is 28

plush oar
lusty quest
#

your godbye message shows 29 and your welcome shows 29

#

or did you manually triggered the event? if yes then NVM

plush oar
#

Yes

quartz kindle
#

@tight plinth try .fetch({id:id,rest:true})

tight plinth
#

lemme try with rest

earnest phoenix
#

@quartz kindle please help im trying to categorize my files but im getting errors

tight plinth
#

thanks god i only have to edit one file

lusty quest
#

@quartz kindle any idea how to get member.hasPermission(ADMINISTRATOR) working again with d.js-light? since its not properly cached it fails even for members with a role that has ADMINISTRATOR. and fetching the member times out (probably needs intend)

tight plinth
#

aaand it seems to work now! thanks

quartz kindle
#

permission checking needs roles to be cached

#

you can use the enablePermissions client option for that

lusty quest
#

enabled caching already

#
const client = new Client({
  enablePermissions: true
});
```
earnest phoenix
#
  fs.readdir("./commands/", (err, files) => {
  files.forEach(f => {
    const file = require("./commands/" + f);
    if (!file.name) throw f + " does not export a name property!";

    bot.commands.set(file.name, file);
    if (file.aliases && Array.isArray(file.aliases))
      file.aliases.forEach(a => bot.aliases.set(a, file.name));
  });
});
``` my code and error
#

@quartz kindle ^^

lusty quest
#

your require path needs to take the additional folders with into account

earnest phoenix
#

how

tight plinth
#

Animals is a folder

earnest phoenix
#

yeah

quartz kindle
#

if you do require("folder here") it will try to require an index.js file in that folder

earnest phoenix
#

?

quartz kindle
#

it will not scan the folder for you and require all files in it

earnest phoenix
#

im confsued

lusty quest
#

you say the script to load all files that end with .js in commands

earnest phoenix
#

uhh do i?

lusty quest
#

but you need to tell it to load all commands in /commands/animals

#

and animals need to be dynamic to load all commands in the categories

earnest phoenix
#

uhh

#

i dont understand

quartz kindle
#

if you want to load files from inside another folder, you need to use readdir again in that folder

earnest phoenix
#

how

quartz kindle
#

do you even know what your code is doing or did you just copy/paste

earnest phoenix
#

someone made the command handler for me because the one i was using wasnt good

quartz kindle
#

well, that one doesnt support folders inside folders

earnest phoenix
#

ohh

#

uhh

#

how can i make it do that then?

quartz kindle
#

as i said, you need to write another fs.readdir section for each subfolder you want to load

earnest phoenix
#

where?

quartz kindle
#

right after you load the first folder

earnest phoenix
#

which is?

quartz kindle
#
fs.readdir("main folder", results => {
  results.forEach(subfolder => {
    fs.readdir(subfolder, subfolderresults => {
      subfolderresults.forEach(file => {
        require(`main folder/${subfolder}/${file}`)
      })
    })
  })
})
#

(this is not real code to copy and paste, just an illustration of how it works)

earnest phoenix
#

ok do i replace with my cmd handler now?

quartz kindle
#

(copying this will not work)

earnest phoenix
#

ok do i replace with my cmd handler now?

#

@quartz kindle

quartz kindle
#

replace with what

lusty quest
#

read what your current handler does

earnest phoenix
#

my current cmd handler

lusty quest
#

and then check what is different

quartz kindle
#

as i said, copying wont work

earnest phoenix
#

im confused again

lusty quest
#

i suggest take a break, take a walk and then read your code and the example again

earnest phoenix
#

ok..

lusty quest
#

this usually helps if you are overwhelmed with something or just cant make sense of it

earnest phoenix
#

yeah its kinda hard for me because of my ADHD so i dont understand things often

quartz kindle
#

@lusty quest can you try member.permissions.has() instead of hasPermissions?

#

also try logging member.permissions

lusty quest
#

it works now. yesterday i added the permission caching and it wont work, then tryed to fetch the user -> timeout. now i uploaded the mainfile and the command with the issue again and it seems to work now

quartz kindle
#

lol weird

#

i cant seem to reproduce the member timeout thing

#

always worked for me

lusty quest
#

i dont request the intends

quartz kindle
#

but im gonna backport v3's version of members.fetch which defaults to rest mode (discord.js also uses rest mode by default when fetching a single member)

lusty quest
#

ok

#

its possible that i didnt realized that i forgot to upload the new mainfile for enabling permissions , was tired af

quartz kindle
#

lmao also possible

viral halo
#

wd

earnest phoenix
#

ok im back

#

just had a walk up and down the road

#

so where were we?

#

@quartz kindle

#

like i want my thing where i do

module.exports = {
name: "",
aliases: [""],
category: "",
run: async (bot, message, args) => {
//code
}
}
``` i want it to be the same
#

Oof

delicate shore
#

Guys

restive willow
#

what's the best way to use a database in a discord.py bot? I've never had to use a db before

#

open one connection at startup or connect whenever someone runs a command that needs it?

lusty quest
#

depends on what database you want to use

restive willow
#

I'll be honest, idk which to use, not even sure what types ther are

lusty quest
#

the widely known are Postgres mysql and Mongodb. Postgres and Mysql are SQL based Databases while MongoDB is No-SQL

#

all have theyre pros and cons

restive willow
#

if I were to use mongo, then, what would be the best way to connect to it

slender thistle
#

with mongo you connect to your database right after declaring the client object and attach the database do it to be able to use it globally (if you use cogs)

restive willow
#

yeah, I have a cog for each of my command categories

slender thistle
#

pymongo or Motor?

restive willow
#

idk the difference, I'll say pymongo

slender thistle
#

One is sync and works fine I believe, the latter is outdated piece of barely working crap that claims to be async

restive willow
#

lol

slender thistle
#

But essentially you get something like

from pymongo import MongoClient

bot = commands.Bot(...)
conn = MongoClient()
bot.db = conn.some_database # also possible to use conn['some_database']
# line below is optional because you can now just do bot.db.my_collection
bot.my_constant_collection = bot.db.my_collection # also possible to do bot.db['my_collection']```
#

I have used pymongo so far and haven't had problems with blocking in my discord.py bots

restive willow
#

would i need to import it in my cogs?

slender thistle
#

Nope, you'd just need to access the bot object

#

which you get from self.bot usually

restive willow
#

oh it's bot.db not just a var

slender thistle
#

mhm

finite nimbus
#
bot.on('guildCreate', async guild => {
    const invites = await guild.fetchInvites();
    each(invites => console.log(code));
})```
Help i want server logging
slender thistle
#

On bot shutdown in the main file you can throw a conn.close() if you want

restive willow
#

right

slender thistle
#

but yeah, that's the overall logic

restive willow
#

I'll mess about with it

#

thanks a bunch

slender thistle
#

@finite nimbus Why do you want to view server invites?

finite nimbus
#

Because, if somebody have an error and i see it in a console... i want to help this people
Sorry for perfect english

slender thistle
#

The errors will be output in the console and you can handle them without getting server invites

#

What you would be doing is not tolerable and probably most likely Discord ToS

restive willow
#

you could provide a support server link

honest perch
#

@finite nimbus whats your main language?

finite nimbus
#

Polish

#

Jestem badziewny z angielskiego, wiem XD

honest perch
#

nie musisz rejestrować zaproszeń, ponieważ w konsoli pojawiają się błędy

slender thistle
#

English-only rule still applying btw

finite nimbus
#

nie musisz rejestrować zaproszeń, ponieważ w konsoli pojawiają się błędy
@honest perch Uhh ok, but i want XD

honest perch
#

That would most likely be against ToS |

#

it would be easier sending just the support server invite

finite nimbus
#

Ehgh

earnest phoenix
#

@quartz kindle im back

tight plinth
#

in js, how can i make a string like `Content
Content1
` be `Content\nContent1`

digital ibex
#

wdym?

sinful belfry
#

so people can see the '\n'?

#

you can just escape it like '\\n'

hazy sparrow
slender thistle
#

.replace('\n', '\\n')

hazy sparrow
#

can someone help me?

digital ibex
#

u need to show ur code, we dont know what it is

hazy sparrow
#

ight

glass flare
#
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});
#

this doesnt seem to work

hazy sparrow
#

@digital ibex

#

dont worr the token is wrong

earnest phoenix
#

how can i check if the members in a voice channnel are users or bots ?

digital ibex
#

i dont ned to see all ur code

#

just the relevant bit

hazy sparrow
#

ok

glass flare
#

if (user.bot) {
console.log("user is bot")
}

#

@earnest phoenix

earnest phoenix
#

yes

digital ibex
#

@glass flare im pretty sure u need to have a actual website not one which is running on ur pc

hazy sparrow
#
else
      if (message.content.startsWith(`${prefix} tag`)) {
      client.commands.get('tag').execute(message);
     
  }
earnest phoenix
#

but how can i do that on a voice channel

#

for every member

glass flare
#

@digital ibex what do you mean?

digital ibex
#

that makes no sense, how can it connect to smoething it has no access to

glass flare
#

i'm not entirely sure how webhooks work, i just want to listen for votes and do something when a vote is recieved

digital ibex
#

if i click there

glass flare
#

whats the best way to do that?

digital ibex
#

its not gonna take me to it

#

u need a domain

glass flare
#

i have a domain

#

now what?

digital ibex
#

then use that website

#

not one which is running on ur pc which only you have access to

glass flare
#

but how?

#

sorry i'm new to this if i sound really stupid

#

but i cant really understand the docs

#

thats exactly what the docs say to do

digital ibex
#

you've got a website, right?

earnest phoenix
#

nvm i found it

glass flare
#

yes

#

i have a domain

digital ibex
#

and its public?

glass flare
digital ibex
#

so if i go to urwebsite- ok

#

then use that, not 0.0.0.5:500

glass flare
#

is that the webhookServer property?

digital ibex
#

i believe u'd do shaycryptoco:UR_PORT.in/dblWebhook

#

i forgot which ways the port goes

glass flare
#

i think the port goes after the .in

pure saddle
#

how can i check a user when go offline

digital ibex
#

idk

glass flare
#

i dont think you can @pure saddle

#

set a node-schedule cron interval, check every 5 seconds 😛

digital ibex
#

try the one u r running on ur website and the port ur running top.gg api thing

#

@pure saddle what library?

pure saddle
#

djs

digital ibex
#

1 sec

earnest phoenix
#

can the api work with Heroku?

slender thistle
#

yes

earnest phoenix
#

ok

#

and i need help making a work cmd

#

for like a coin thing

#

im using mongoDB

glass flare
#

@earnest phoenix i can help 🙂

#

whats the problem?

earnest phoenix
#

whats the problem?
@glass flare i need help making some sort of coin system thing like dank memer ect. im using mongoDB and i dont really want to use mongoose

hazy sparrow
#
else
      if (message.content.startsWith(`${prefix} tag`)) {
      client.commands.get('tag').execute(message);
     
  }
digital ibex
#

i've already told u, bow pro

hazy sparrow
#

what?

glass flare
#

well I use mongoose, don't see why not @earnest phoenix

digital ibex
#

u need to provide more context

earnest phoenix
#

well I use mongoose, don't see why not @earnest phoenix
@glass flare i dont know how to use it :/

glass flare
#

docs are relatively easy to understand

digital ibex
#

mongoose is pretty simple,

glass flare
#

start there

earnest phoenix
#

im using mongoDB for my set prefix cmd

#

tho

hazy sparrow
#

ive literally provided the whole code

digital ibex
#

no u haven't bow pro

#

we dont even know what that file looks like

glass flare
#

@digital ibex how do I set the URL

#

for the webhook

digital ibex
#

im assuming its a string

#

or ever looked at the docs

#

send ur code where the new topGG thing is

glass flare
#
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});
digital ibex
#

does it say its running at https://..

#

or

glass flare
#

well

#

yea it logs the "webhook running" thing

#

ya

digital ibex
#

ah

#

im not sure I can help u then lmao, it seems it creates it for u

#

shay, does the example not work? try just doing new DBL(token, discord client)

glass flare
#

i did

digital ibex
#

try adding the third parameter

green kestrel
#

Yay took me ages

#

No issues at all

digital ibex
#

nice

#

dude

hazy sparrow
#

?

digital ibex
#

if u look at the error stack, u only need to show 1 line of the tag.js file and where ur executing it

hazy sparrow
digital ibex
#

how r u executing other commands?

hazy sparrow
#

same way

#

but other commands work

#

only not this

earnest phoenix
#

im making a coin system

tulip ledge
#

Question, if you have lets say 20000 guilds and about every couple seconds someone votes and you send a message in a channel for all the voters will that be ratelimitted?

earnest phoenix
stark vault
#

Is this supposed to happen when downloading Eslint or is it just my computer?

sinful belfry
#

@tulip ledge if you're getting votes every couple of seconds, then likely not

tulip ledge
#

Does anybody know if there's a way to check what discord badges a user has?

sinful belfry
#

since the discord limit is 5 every 5 seconds

tulip ledge
#

Ah ok

#

So if its more then 1 a second

#

You'll get ratelimited

sinful belfry
#

@stark vault nope, it is just lodash

stark vault
#

Oh ok

summer torrent
#

Does anybody know if there's a way to check what discord badges a user has?
@tulip ledge which library

tulip ledge
#

djs

summer torrent
#

<User>.flags.toArray()

tulip ledge
#

alr

#

Ty vm

earnest phoenix
digital ibex
#

you tell us

earnest phoenix
#

i dunno

#

tho

#

lmao

pure lion
#

Error?

earnest phoenix
#

ye

pure lion
#

Send

earnest phoenix
pure lion
#

Uh

hazy sparrow
#

```if (message.content.startsWith(${prefix} tag)) {
client.commands.get('tag').execute(message);

}

pure lion
#

Did you read the error or do we have to translate it to audio

hazy sparrow
#

i did

earnest phoenix
#

Did you read the error or do we have to translate it to audio
@pure lion ?

glass flare
#

@digital ibex it still doesnt work

#
const DBL = require('dblapi.js');
const dbl = new DBL(token, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
    console.log(vote);
    console.log(`User with ID ${vote.user} just voted!`);
});
#

thats my entire code

#

it logs the "Webhook running" line but not the votes

fast yacht
#

Where is a good place to find someone to test your bot?

hazy sparrow
earnest phoenix
glass flare
#

@earnest phoenix replace .get with .findOne

#

and remove the "" around "u_id"

earnest phoenix
#

ok why?

fast yacht
#

.get isn't a mongoose method. findOne is..

glass flare
#

thats how i've done it before

earnest phoenix
#

wait on what line?

glass flare
#

on the let money line

earnest phoenix
#

ok

#

is that code i done correct? and easy

#

?

#

like of the ppls?

#

of smth

#

like is it good code

glass flare
#

ya it all looks good

earnest phoenix
#

ok

#

🙂

#

im testing first

glass flare
#

just intend the two awaits in the if else and unindent the if and else

#

so it looks cleaner

earnest phoenix
#

intend?

glass flare
#

so instead of

  if () {
await...
  } else {
await...
  }

do

if () {
  await...
} else {
  await...
}
#

it shouldnt make any difference to how it runs but its just better practice

earnest phoenix
glass flare
#

correct

fast yacht
earnest phoenix
#

ok

glass flare
#

are you using vs code?

earnest phoenix
#

i got a second error

#

im using github

fast yacht
#

oh. then nevermind about the extension.

glass flare
#

send the code as text

#

ill recode it in a different way which should work

earnest phoenix
#
const Discord = require("discord.js")

module.exports = {
name: "work",
aliases: ["w"],
category: "Currency",
run: async (bot, message, args) => {
let money = await bot.db.collection("Money").findOne({u_id:message.author.id});
  
let random = Math.floor(Math.random() * 100);

if (!money) {
        await bot.db.collection("Money").updateOne({"u_id":message.author.id}, {$set:{money:0 + random}},  {upsert:true}) 
} else {
        await bot.db.collection("Money").updateOne({"u_id":message.author.id}, {$add:{money:random}},  {upsert:true}) 
}
  
}
}
fast yacht
#

$add should be replaced with $set
I think..

earnest phoenix
#

no it will set it wont add to original number

#

it could be .addOne

glass flare
#

do you have a schema loaded in

#

for Money

earnest phoenix
#

wdym?

glass flare
#

okay nvm i'll use another method

delicate shore
#
 if (!msg.guild.member(client.user).hasPermission("MANAGE_ROLES")) return msg.reply('I do not have the correct permissions.').catch(console.error);```
earnest phoenix
#

yeah i use mongodb not mongoose

delicate shore
#

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'hasPermission' of null

#

this is error

glass flare
#
const Discord = require("discord.js")

module.exports = {
    name: "work",
    aliases: ["w"],
    category: "Currency",
    run: async (bot, message, args) => {

        bot.db.collection("Money").findOne({
            u_id: message.author.id
        }, (err, money) => {
            if (err) console.log(err);
            let random = Math.floor(Math.random() * 100);

            if (!money) {
                await bot.db.collection("Money").updateOne({
                    "u_id": message.author.id
                }, {
                    $set: {
                        money: 0 + random
                    }
                }, {
                    upsert: true
                })
            } else {
                money.money += random;
                money.save().catch(err => console.log(err));
            };

        })
    }
}
#

@earnest phoenix

#

try that

earnest phoenix
#

ok

delicate shore
#

hlp me

fast yacht
#

maybe you could do this inside the

} else{
const newMoney = money.money + random
await bot.db.collection("Money").updateOne({"u_id":message.author.id}, {$set:{money:newMoney}},  {upsert:true}) 
earnest phoenix
#

@delicate shore try message.guild.me.hasPermission()

delicate shore
#
 msg.guild.member(...).addRole is not a function```
#
    msg.guild.member(user).addRole(muteRole).then(() => {
spare mirage
#

🤦‍♂️ still stuck on a mute command

restive pebble
#

Find lol

earnest phoenix
glass flare
#

idk then bro sorry

delicate shore
#

🤦‍♂️ still stuck on a mute command

tight plinth
spare mirage
#
  let muterole = message.guild.roles.cache.find(role => role.name === 'muted');
if(!muterole){
    try{
    muterole = await message.guild.roles.create({ data: { name: 'muted' } });
    message.guild.channels.forEach(async (channel, id) => {
        await channel.overwritePermissions(muterole, {
          SEND_MESSAGES: false,
          ADD_REACTIONS: false
        });
      });
    }catch(e){
      console.log(e.stack);
    }
  }

``` @delicate shore
pale vessel
#

can you not?

spare mirage
#

¯_(ツ)_/¯

#

burh

#

it has been 5 hours

digital ibex
#

imagine not using a custom mute role

spare mirage
#

?

restive pebble
#

Lol

earnest phoenix
spare mirage
restive pebble
earnest phoenix
#

ok thanks

delicate shore
#

@spare mirage no

#

i wanna add role to person

restive pebble
#

First find

#

There is no use if make a role with same name

spare mirage
#

bruh

#

DOCS

#

omggg

restive pebble
#

Imagine everytime muting someone creates a new role

digital ibex
#

i mean, thats amazing

restive pebble
#

Ya

digital ibex
#

cough

restive pebble
#

Epic

green kestrel
#

oh i do love steam summer sales 😄

restive pebble
#

Ok

#

Same

delicate shore
#

let muteRole = msg.guild.roles.cache.find(role => role.name === 'Muted');

green kestrel
delicate shore
#

i already use this @restive pebble

restive pebble
#

Noice

#

Okk

#

Does it work?

delicate shore
#

no

restive pebble
#

Then it's not cached

delicate shore
#

wot

restive pebble
#

Abuse api

delicate shore
#
 msg.guild.member(...).addRole is not a function```

@delicate shore

restive pebble
#

Then

delicate shore
#

this is the only error

#

i am facing

#
    msg.guild.member(user).addRole(muteRole).then(() => {

@delicate shore

restive pebble
#

Whom are u adding the role

#

.get

digital ibex
#

it can't find the member? most likely thats the issue

restive pebble
#

Or fetch

tulip ledge
#

.roles.add

#

addRole is v11

restive pebble
#

Oh lol

tulip ledge
#

<Member>.roles.add(role)

pure saddle
#

.roles.add

tulip ledge
#

Dude

#

Didnt I just-

restive pebble
#

He said

#

Lol

pure saddle
restive pebble
#

So ur bot got accepted?

pure saddle
#

i still waiting

earnest phoenix
#
const Discord = require("discord.js")

module.exports = {
    name: "work",
    aliases: ["w"],
    category: "Currency",
    run: async (bot, message, args, err) => {
let money = bot.db.collection("Money").findOne({u_id: message.author.id})

            if (err) console.log(err);
  
            let random = Math.floor(Math.random() * 100);

            if (!money) {
                await bot.db.collection("Money").updateOne({"u_id": message.author.id}, {$set: {money: 0 + random}}, {upsert: true})
            } else {
                await bot.db.collection("Money").updateOne({"u_id": message.author.id}, {$set: {money: random}},  {upsert: true}) 
                .catch(err => console.log(err));
            };
    }
}
``` guys it doesnt save the number and then add it help
tulip ledge
#

What db is that

delicate shore
#

worked

restive pebble
#

mongo

tulip ledge
#

Oh

restive pebble
#

Kek

tulip ledge
#

I thought mongoDB was SQL

lyric mountain
#

nope

restive pebble
#

Sql good

tulip ledge
#

SQL = English

earnest phoenix
#

so can anyone help?

restive pebble
#

Bruh

tulip ledge
#

I mean

#

I don't see you taking the preexisting money

#

And adding that to the random money

#

And savind that

#

You're just saving the random money

lyric mountain
earnest phoenix
#

?

digital ibex
#

mongodb is nosql

restive pebble
#

Use own logic

earnest phoenix
#

im trying to but i cant

#

im not sure how

restive pebble
#

Use own logic
@restive pebble

tulip ledge
#

Yes ok

#

He's getting the money @lyric mountain

#

But when he's saving it

#

He's saving the random money

#

Not the money they have + random

#

U wanna do like

digital ibex
#

wut

tulip ledge
#

money: money + random

earnest phoenix
#

im lke tryna add money to the uhh thingy

restive pebble
#

Make a json file

#

Lol

earnest phoenix
#

no

lyric mountain
#

dont

tulip ledge
#

EW

#

WTF

#

NO

earnest phoenix
#

im using heroku

#

it doesnt work

restive pebble
#

Bruh

graceful dock
#

Use findOneandUpdate

earnest phoenix
#

tf

#

could tim help. ;_;

lyric mountain
#

dude, 2 people already gave you the answer

restive pebble
#

He knows about mongo db

#

He can

#

Ig

earnest phoenix
#

bruh

#

helpme

tulip ledge
#

money: money + random

lyric mountain
tulip ledge
#

I mean I've never used mongo before but it's just logic

lyric mountain
earnest phoenix
#

money: money + random where?

tulip ledge
#

🤦

restive pebble
#

Oh my god

earnest phoenix
#

where do i put

tulip ledge
restive pebble
#

We cannot spoonfeed u

earnest phoenix
#

bruh i may need tho

restive pebble
#

No

tulip ledge
#

I GAVE U THE ANSWER

restive pebble
#

It's rule

tulip ledge
#

FFS

lyric mountain
#

I wonder if you really made that code yourself

tulip ledge
#

Tbh

restive pebble
#

No

tulip ledge
#

I don't think so

earnest phoenix
#

no someone helped

restive pebble
#

Ik

tulip ledge
#

You mean github helped

#

Or stackoverflow

earnest phoenix
#

no

restive pebble
#

M

earnest phoenix
#

help

restive pebble
#

Ut

earnest phoenix
#

in this server

restive pebble
#

Yt

fast yacht
#

@earnest phoenix

} else{
const newMoney = money.money + random
await bot.db.collection("Money").updateOne({"u_id":message.author.id}, {$set:{money:newMoney}},  {upsert:true}) 

replace your else statement with this and you should be good

earnest phoenix
#

no i get error when do

fast yacht
#

let me see the error

lyric mountain
restive pebble
#

:

lyric mountain
#

money.money wouldn't work

restive pebble
#

Yes

earnest phoenix
#

thats the error

#

money.money

lyric mountain
#

so fix it

tulip ledge
#

As money is a variable

restive pebble
#

Hmmm

tulip ledge
#

Not an object

#

Or class

restive pebble
#

Variable and object has different

fast yacht
#

Money is a mongo object, no?

tulip ledge
#

So yo ucan't call keys on it

#

Oh

#

Wait

#

Could be

#

Idk

#

I never used mongo lol

earnest phoenix
#

im confused

restive pebble
#

Take some time

#

And chill

earnest phoenix
#

i have

#

i have

fast yacht
#

@earnest phoenix you said you had it on Github. Link it, please

tulip ledge
#

Oh yeah

lyric mountain
#

money is a key

earnest phoenix
#

@earnest phoenix you said you had it on Github. Link it, please
@fast yacht its private

restive pebble
#

Wow private

earnest phoenix
#

yes private repo

restive pebble
#

Woah

#

Epic

tulip ledge
#

WHy use github when u set it to private?

fast yacht
#

@earnest phoenix
Code needs to public. You will never learn unless you feel the public shaming your code;D

restive pebble
#

Yeah

tulip ledge
#

Isn't github ment for open source?

restive pebble
#

Why

earnest phoenix
#

@earnest phoenix
Code needs to public. You will never learn unless you feel the public shaming your code;D
@fast yacht mt token tho

#

my

restive pebble
#

My all codes are open source

lyric mountain
#
Money: {
  u_id: "12345678",
  money: 500
}
tulip ledge
#

Put ur token in like a .env

#

Or whats it called

#

Idk

lyric mountain
#

this is his Money structure as I can see

tulip ledge
#

I don't use github

restive pebble
#

process.env

earnest phoenix
#
Money: {
  u_id: "12345678",
  money: 500
}

@lyric mountain uhhh

restive pebble
#

Git hub is hot tho

fast yacht
restive pebble
#

Wow

tulip ledge
#

Dude

#

Boeing

restive pebble
#

Yas

tulip ledge
#

U've said wow 19 times already

#

Lmao

restive pebble
#

Yeah

earnest phoenix
#

i need help tho ;p;

fast yacht
#

Can you send the whole file one more time here?

tulip ledge
#

We literally spoonfed u

restive pebble
#

Ya

#

In short

earnest phoenix
#
const Discord = require("discord.js")

module.exports = {
    name: "work",
    aliases: ["w"],
    category: "Currency",
    run: async (bot, message, args, err) => {
let money = bot.db.collection("Money").findOne({u_id: message.author.id})

            if (err) console.log(err);
  
            let random = Math.floor(Math.random() * 100);

            if (!money) {
                await bot.db.collection("Money").updateOne({"u_id": message.author.id}, {$set: {money: 0 + random}}, {upsert: true})
            } else {
                await bot.db.collection("Money").updateOne({"u_id": message.author.id}, {$set: {money: random}},  {upsert: true}) 
                .catch(err => console.log(err));
            };
    }
}
restive pebble
#

Spoonfeed

tulip ledge
#

I literally said WHAT TO DO

lyric mountain
#

you could just...like...put your token in a simple js file exporting it then require it in index.js

tulip ledge
#

spoonfed is past?

#

Right?

restive pebble
#

He uses heroku lel

fast yacht
#

hold on. 1 minute

tulip ledge
#

money: money + random

#

Is it so hard?

lyric mountain
#

not that one ^

earnest phoenix
#

i tired doesnt work

tulip ledge
#

Oh wait

earnest phoenix
#

tried

restive pebble
#

mhm

tulip ledge
#

money.money + random

earnest phoenix
#

no

lyric mountain
#

nope

earnest phoenix
#

that doesnt work

tulip ledge
#

Wut

#

then how are u saving ur things

restive pebble
#

Hmmmm

tulip ledge
#

Ur data

earnest phoenix
#

money isnt an object or smth

tulip ledge
#

Wth

restive pebble
#

Learn mongo first

#

Pls

tulip ledge
#

^^^

earnest phoenix
#

bruh

restive pebble
#

Or Nosql

#

What bruh

earnest phoenix
#

no

tulip ledge
#

Tf is nosql?

earnest phoenix
#

im gonna do mongoDB

lyric mountain
restive pebble
#

If u don't know how to use dbs

tulip ledge
#

No

restive pebble
#

And saying bruh

tulip ledge
#

0 is there cuz if money does not exist

lyric mountain
#

ah

tulip ledge
#

@lyric mountain So wont work

lyric mountain
#

put it below then

tulip ledge
#

Thats what I said

#

Lmao

restive pebble
#

One last thing I wanna say :

READ THE DOCS

fast yacht
#
const Discord = require("discord.js")

module.exports = {
    name: "work",
    aliases: ["w"],
    category: "Currency",
    run: async (bot, message, args, err) => {
        const money = await bot.db.collection("Money").findOne({u_id: message.author.id})

            if (err) console.log(err);
  
            const random = Math.floor(Math.random() * 100);

            if (!money) {
                await bot.db.collection("Money").updateOne({"u_id": message.author.id}, {$set: {money: 0 + random}}, {upsert: true})
            } else {
                const newMoney = money.money
                await bot.db.collection("Money").updateOne({"u_id": message.author.id}, {$set: {money: newMoney}},  {upsert: true}) 
                .catch(err => console.log(err));
            };
    }
}

Don't listen to the gatekeepers around here. Try this. make sure that you're actually executing run and not execute as this is what DiscordJs is suggesting.

lyric mountain
#

@fast yacht stop spoonfeeding

restive pebble
#

Yeah

tulip ledge
#

Spoonfeeding is against the rules friend

lyric mountain
#

it's against the rules in this server

#

that ain't gatekeeping

solemn latch
#

Yikes

tulip ledge
#

Oh and ur code is wrong

#

Lmao

tight plinth
#

@fast yacht execute or run, it depends on your command handler

tulip ledge
#

newMoney = money.money

restive pebble
#

Wut

tulip ledge
#

You're not adding the random

lyric mountain
restive pebble
#

Spoonfeed goes wrong

tulip ledge
#

So you're just putting the money back in there

#

Without adding any new money

#

If you spoonfeed make sure the code is right lmao

#

Lmao

delicate shore
#

@outer marsh

#

how can i ping my bot?

lyric mountain
#

you can't

delicate shore
#

he is not in serverv

tulip ledge
#

My bot isn't in here either

lyric mountain
#

because it's not here yet

tight plinth
#

you cant here

tulip ledge
#

And i'm sad 😦

delicate shore
#

@outer marsh

#

my bot

tulip ledge
#

My bot isn't in the server

delicate shore
#

i can ping him

lyric mountain
#

it's not here yet

delicate shore
#

wot

lyric mountain
#

all we see are numbers

tulip ledge
restive pebble
#

Don't listen to the gatekeepers around here.

delicate shore
#

oh

restive pebble
#

This line

tulip ledge
#

My bot isn't in here 😦

solemn latch
#

Because its cached in your discord

delicate shore
#

oooooooooo

tulip ledge
#

Don't listen to spoonfeeders who give the wrong code either

restive pebble
#

@languid bridge

#

Ur bot has common prefix

#

That's why

tulip ledge
#

For me?

#

My bot?

restive pebble
#

Yea

tulip ledge
#

Oh

restive pebble
#

Orelse it should see channels

lyric mountain
#

Ur bot has common prefix
@restive pebble wut was that ping?

tulip ledge
#

@signal cove

restive pebble
#

My bot

tulip ledge
#

Oh yeah

lyric mountain
#

ah

restive pebble
#

Ya

tulip ledge
#

He is in here

restive pebble
#

For lvl up

tulip ledge
#

Wtf is common prefix?

restive pebble
#

Ig

tulip ledge
#

Oh

#

I know why

solemn latch
#

Like !

restive pebble
#

¯\_(ツ)_/¯

tulip ledge
#

It has a setting

#

Put to ?

#

Well rip lmao

lyric mountain
#

Wtf is common prefix?
@tulip ledge bots that have !*-.$+~ as prefix

solemn latch
#

If its configurable tell a mod to change it for ya

restive pebble
#

Hmmm

tulip ledge
#

Oh lmao

restive pebble
#

Hmmmm

earnest phoenix
#

so i need help so please help me

restive pebble
#

U have been helped

earnest phoenix
#

where

restive pebble
#

ig

earnest phoenix
#

well those codes didnt work

#

for me

#

soo..

solemn latch
#

The other suggestion was to get more familiar with Mongodb before implementing it.

earnest phoenix
#

;-;

restive pebble
#

Rtd

delicate shore
#

my bot creates another muted role

earnest phoenix
#
    const DBL = require('dblapi.js');
    const dbl = new DBL('TOKEN', { webhookPort: 25565, webhookAuth: 'PASS' }, client);

Why does it not auto update?

delicate shore
#

but there is already one muted role

restive pebble
#

That's the problem

#

I told

#

U

earnest phoenix
#

?

delicate shore
#

how to solve

earnest phoenix
#

Hey Boeing know how to fix this

restive pebble
#

What

lyric mountain
#

my bot creates another muted role
@delicate shore are you getting the role by ID?

restive pebble
#

Hmmm

lusty quest
#

did you got a post event?

earnest phoenix
#

??

delicate shore
#

if(command === "mute"){
    let reason = args.slice(2).join(' ');
  let user = msg.mentions.users.first();
 let muteRole = msg.guild.roles.cache.find(role => role.name === 'Muted');
    
    if(!msg.member.hasPermission("MANAGE_MESSAGES"))
      return msg.reply("You need atleast Manage Messages perms to do this brvh");
    
 

 if(!muteRole){
    try{
    muteRole = await msg.guild.roles.create({ data: { name: 'muted' } });
    msg.guild.channels.forEach(async (channel, id) => {
        await channel.overwritePermissions(muteRole, {
          SEND_MESSAGES: false,
          ADD_REACTIONS: false
        });
      });
    }catch(e){
      console.log(e.stack);
    }
  }
  
  if (msg.mentions.users.size < 1) return msg.reply('You must mention someone to mute them.').catch(console.error);
  const embed = new Discord.MessageEmbed()
    .setColor(0x00AE86)
    .setTimestamp()
    .addField('Action:', 'Mute')
    .addField('User:', `${user.username}#${user.discriminator} (${user.id})`)
    .addField('Modrator:', `${msg.author.username}#${msg.author.discriminator}`)
    .addField('Reason', reason);

  if (!msg.guild.me.hasPermission("MANAGE_ROLES")) return msg.reply('I do not have the correct permissions.').catch(console.error);

     msg.guild.member(user).roles.add(muteRole).then(() => {
      msg.channel.send(embed).catch(console.error);
    });
  }
lusty quest
#

just for checking if the client is working

earnest phoenix
#

Uhh I don't have one, no.

delicate shore
#

and @restive pebble the new role it creates i can still talk with it i mean the user

tulip ledge
#

Ok so I changed the prefix

restive pebble
#

if that role exists font create

lyric mountain
restive pebble
#

Dont

tulip ledge
#

How can I get it to not have common prefix anymore?

lyric mountain
#

Muted != muted

restive pebble
#

Change the prefix

tulip ledge
#

I did

delicate shore
#

beoing help