#development

1 messages · Page 536 of 1

slim heart
#

(a 0ws)

earnest phoenix
#

yesn’t u

#

Wait

#

even better

#

Am smart

#

is >$%

#

best prefix

slim heart
#

no use a 0 width space

earnest phoenix
#

No

#

It’s

#

!

#

Honestly kids these days 🤦

slim heart
#

says the kid

earnest phoenix
#

yeah what the heck kid

#

I’m a folder btw

sick cloud
#

i use the most unique prefix

#

nobody else has it

earnest phoenix
#

3)’fndynegnetbe

sick cloud
#

no

#

yt

earnest phoenix
#

That’s mine

sick cloud
vernal rivet
#

mine is panda!

#

lol

earnest phoenix
#

My prefix is

#

I’m prefix! I

slim heart
#

<insert-cool-prefix-here>|

earnest phoenix
#

Ignore the I

slim heart
#

thats my prefix

earnest phoenix
#

my prefix is prefix

#

Oh make your prefix

last ferry
#

my prefix can technically be despactio

#

since you can make it whatveer you want

#

as long as its under 10 characters

earnest phoenix
#

my prefix could be

#

my prefix could be

#

my prefix could be

#

Oof

sick cloud
#

show me where your prefix is yt @earnest phoenix zoomeyes

#

also stop

#

@coral trellis

earnest phoenix
#

Mobile apps lag

sick cloud
#

we have spam

earnest phoenix
#

I press the button once

slim heart
#

no its not him spamming

earnest phoenix
#

And since I have T-Mobile btw

slim heart
#

it happens to me too

earnest phoenix
#

That’s what’s happening lmao

#

Mobile apps are mean

slim heart
#

it just doesnt send and then it decides to send three times

coral trellis
#

Alright just leave it, it was an accident so carry on

earnest phoenix
#

hahaha

raven bronze
#

POLL
Which prefix looks/sound better?

dblSmile = “tiktok:command”
dblAdmin = “!TikTok command”
doggowave = “$tiktok command”
😀 = “tk.command”

TikTok can also be TT for short. And mentions too.

lament meteor
#

use mention

blazing star
#

not in some cases

#

still tho

raven bronze
#

Not the point ._.

sick cloud
#

none

raven bronze
#

@sick cloud dude just pick one geez

earnest phoenix
#
        if(killoff == null) {
            const help = new Discord.RichEmbed()
            .setDescription("Hello, " + message.author.username + `! I am ${bot.user.username} and here are my commands:`)
            .setColor(colors)
            .addField('🎉 fun', `These commands are fun!`)
            .addField("✋ basic", `Some classic commands`)
            .addField(" ✅ custom", "Custom commands (**ccadd, ccdelete and ccprefix Requires you to have specific permissions**)")
            .addField(" ⬆️️ http", "HTTP request commands")
            .addField("🔧 config", "Configurable server commands for your guild. Such as.. set join message, set leave message.. and so on.. (**requires specific permission for these**)")
            .addField("🔨 moderation", "the moderator commands (**requires specific permission for these**)")
            .addField("USAGE", "**type " + prefix + "help <command category> to list commands on that category**")
            .addField("PERMISSIONS", "**If the bot is not responding to any commands, please make sure it has 'MANAGE_MESSAGES' permissions, or it will not work.**")
            .addField("Credits", "**Created by Swifti#2050**")
            message.channel.send(help)
    }``` How would I add like a link into that where it doesn't show as a link, but it shows like Click `here`. but the here is a link
#

Instead of credits

lament meteor
#

markdown @earnest phoenix [text](link)

earnest phoenix
#

Like an UPVOTE HERE section

#

So an example of that would be, here @lament meteor

lament meteor
earnest phoenix
#

thanks it worked

sick cloud
#

how many times cam you safely edit a role per hour or something

lament meteor
#

theoreticly a minuted

#

lemme check the ratelimits

sick cloud
#

okay

earnest phoenix
#

why my bot does not all all command modules

#

await Commands.AddModulesAsync(Assembly.GetEntryAssembly());

#

inevermind i found out the problem

lilac grail
bright spear
#

That's an issue with your site's code, we'd need to have the link to help

misty rune
#

-bots 293317293222526976

gilded plankBOT
#

User not found

misty rune
#

Rip

#

-bots <@293317293222526976

gilded plankBOT
#
Toxic#2666
Bots

@normal salmon

quasi forge
lament meteor
#

show he full error

quasi forge
#

There's no error

#

The response is the only problem

#

There was no error and the status code was also 200.

quartz kindle
#

undefined in the console.log or undefined in the send?

quasi forge
#

Undefined in the console.log as well as send.

queen fog
#

-bots @gilded plank

gilded plankBOT
#

Bots don't have bots, silly.

queen fog
#

XD

coral trellis
#

Don't use Luca in here please, Keep this chat development oriented

keen drift
#

yes. how do I develop another dyno bot @coral trellis

coral trellis
queen fog
#

Ok

quasi forge
#

Any luck with my problem?

queen fog
#

Something smells fishy here

keen drift
#

@quasi forge not really, i'd try replicate it in something like postman

quasi forge
#

It doesn't work anywhere

#

I've tried a lot

keen drift
#

?

quasi forge
#

And finally gave up and asked you guys

keen drift
#

Replicate the request in postman

quasi forge
#

Already did

keen drift
#

and what's the response?

quasi forge
#

Brb

keen drift
#

...k

slim heart
#

@quasi forge you’re not requesting site if I’m not mistaken

#

Well

#

It might work like that

#

But just try and do
request(site_url,options)

#

And if that doesn’t work all I can really think of is that you should use .then but at the same time probably doesn’t matter but that’s how I do it. idk

lilac grail
empty steppe
#

anyone else having multiple connection resets with their bots today? (dicord.py)

keen drift
#

lmao, yes

#

take a look at the tweet & messages stash

empty steppe
#

ok thanks, thats reassuring 😃

quasi forge
#

@keen drift it says "404 not found"

#

Sorry for the delay

slim heart
#

@quasi forge try what I said

#

Do

request(`https://discordapp.com/api/oauth2/token`, access_options, function(etc..```
earnest phoenix
#

can anyone help

#

emojis not working on bot

#

i enter correct and bot is in server

#

but no :/

#

it always shows

#

:emoji:

#

😫

coral trellis
#

Emotes don't work in titles

earnest phoenix
#

uhh 😦

coral trellis
#

They do not work in .setTitle()

ruby dust
#

titles and footer is a no no

#

especially footer

#

markdown doesn't even work there

earnest phoenix
#

ok

last ferry
#

Yeah nsfw commands aren’t allowed to be advertised

#

Smh

#

Well I’m not a server administrator so I guess I’ll skidaddle

#

You need a full invite link

#

Yes you do

#

Watch it work

#

Wager

#

Try it

#

Try it

#

cool

#

Then you must be doing it wrong

#

🤷

#

got me good

coral trellis
#

You need to calm down

keen drift
#

This shit toxic

last ferry
#

You’re the one getting pissed over it

#

I was just trying to help

#

How was I supposed to know you already tried it

#

Kek blocked

#

Unlucky

#

Ok back to development

slim heart
#

Yeah callumok you’re being toxic for no reason don’t get pissed when you don’t get help

last ferry
#

He’s muted

#

And he bitched in my dms and blocked me

slim heart
#

Because if you disrespect the people giving you help you don’t get help

#

A n y w a y s

keen drift
#

Kek a whole month mute

last ferry
#

Deleted all messages too

#

That’s toxic

earnest phoenix
#

"online" emoji id pls

#

:online:

last ferry
earnest phoenix
#

id?

last ferry
#

313956277808005120

#

There u go

earnest phoenix
#

eyw

last ferry
#

Just had to copy it

earnest phoenix
#

thnks

muted oxide
#

can i have the image of him calling you out @last ferry

last ferry
#

Np

muted oxide
#

in DMs

earnest phoenix
lament meteor
#

other way around

#

<:name:id>

earnest phoenix
#

hocam

#

türkmüsün

#

@lament meteor

lament meteor
#

sorry i don't understand turkish

earnest phoenix
#

hmm

#

yeah

#

and

#

1m pls

#

When you do that, only the name is coming.

earnest phoenix
#

@earnest phoenix

late hill
#

You can't just use any emoji

#

Your bot has to be in the server the emoji is coming from

earnest phoenix
#

evet @earnest phoenix

#

Aga

#

Emojinin oldugu sw de botun varmi.

late hill
earnest phoenix
#

;D

#

hayır

#

.d

#

Olmali.

#

hmm

#

bana biri online emojisi versin

#

.d

late hill
#

Maybe you should stop

thick bay
#

I am not looking to be "spoonfeed" the code, but how would I prevent my music bot from stopping any playing music when someone joins. I am using discord.js

lament meteor
#

@thick bay when someone joins?

thick bay
#

Yes

#

Well joins/leave

#

That's the only thing I can't solve

lament meteor
#

the voice channel?

thick bay
#

Correct

lament meteor
#

it should not be an issue

thick bay
#

Well some reason

#

wait

#

Unless I have

#

Let me look at something

#

nvm

#

Found my issue lol

lament meteor
#

lol

thick bay
#

Some reason my greeting message has a part where it stops the music I am very blind but it's okay

lament meteor
#

👀

raven bronze
#

So about 20% into TikTok bot,
How can I get its raw video sources? It seems that every page has a diffrent ID in some way

Take this hashtag for example: https://m.tiktok.com/h5/share/tag/72785511.html?name=1millionaudition&u_code=dal4j8l25hjfm&timestamp=1537072617&user_id=295296894812102656&utm_source=twitter&utm_campaign=client_share&utm_medium=android&share_app_name=musically&share_iid=6593596803449571078

now lets look at a video: https://m.tiktok.com/v/6621806094836567302.html

evertthing is diffrent, so I'm confused on how to make a bot for this.

#

Heres the sources, but I had to find it by inspefting the vido using chrome:

#

^^^ so can anyone help in the small way by finding/showing me a way to get a tiktok's raw source video

#

^ it may just play in a audio channel

earnest phoenix
#

Is there a way to make a hyperlink in a footer?

inner jewel
#

no

earnest phoenix
#

damn

#

that's rough

#

hey

#

i cant use emojis on bot

#

bot shows <:emoji:id> as :emoji:

#

but bot is in server that emoji exists (my server so eh i am sure bot is in server)

#

but i am so confused

inner jewel
#

how did you copy the id

earnest phoenix
#

:emoji:

#

\ emoji

languid dragon
#

show code

earnest phoenix
#

ok

rigid crane
#

how to code a

west raptor
#

a what

languid dragon
#

a

rigid crane
#

if my bot has a permission name CONNECT

mossy vine
#
print('a')```
rigid crane
#

that is python

#

i mean discord.js lib

#

node.js core\

#

😛

mossy vine
#
console.log('a')```
#

there you go

rigid crane
#

thanks a lot

#

but that is not i want

#

if my bot doesnt have the permission 'CONNECT'

#

then return?

#

i cant use this

earnest phoenix
#

@languid dragon

languid dragon
#

what?

earnest phoenix
rigid crane
earnest phoenix
#

but it shows as

#

: no :

languid dragon
#

does it show as !no

earnest phoenix
#

no

rigid crane
#

anyone can solve my question?

languid dragon
#

does it show as :no:

earnest phoenix
#

yes

languid dragon
#

because it doesn't work in this

earnest phoenix
#

oh shhht

#

ok

languid dragon
#

![no](https://cdn.discordapp.com/emojis/506510569264644097.webp?size=128 "no")

#

:no:

earnest phoenix
#

but in embeds too it doesnt show

rigid crane
#

ok i think no

earnest phoenix
#

is there a trouble

#

oh

#

uwu

#

its wrong

#

its not in `

#

its in out of it

slim heart
#

WeiKu

#

hasPermission is a method of member (guildMember)

#

The bots user object has nothing to do with the guild

#

What’re you trying to do?

#

@rigid crane

rigid crane
#

The music bot

slim heart
#

I’m guessing you’re trying to see if (on message event) it checks if it has permission

#

Wait are u the other developer from the other day?

rigid crane
#

message.bot.user?

slim heart
#

The muscii()

#

No

#

You’re trying to check if you have permission on message?

rigid crane
#

Uhhhh

slim heart
#

What’re you trying to do? Check if the bot has permissions for that guild?

rigid crane
#

Yes

slim heart
#

Ok

#

message.guild.me.hasPermission(“PERMISSION_STRING”)

rigid crane
#

me?

slim heart
#

.hasPermission is only run on a guild member

rigid crane
#

Oh

slim heart
#

Yes .me retrieved the bots member object

earnest phoenix
#

.me

slim heart
#

Yes

rigid crane
#

So the me mean the bot

#

Okay thank 👌

slim heart
#

.me gets the member object of the bot from the guild

#

Instead of doing members.get(bot.id)

rigid crane
#

Ok

#

I see

slim heart
slate kayak
#

hello all sorry for coming here just want to know if somebody here that can help me make my bot do +help get commands then +play choose a num for that specific track please

vernal rivet
#

sure

#

are you asking abot doing getting the help command to grab all the commands. and then the play command?

earnest phoenix
#

Pls

vernal rivet
#

? @earnest phoenix

barren brook
#

How do I make a command to lock a channel for say the perms to send a message is tickNo or tickYes

raven bronze
#
message.channel.send("Channel locked. <tickNo:522836014733983745>";```
barren brook
#

I need it so a sertain role can’t send messages on a channel

raven bronze
#

^ ^ ^ spoonfed no spoonfeeding

barren brook
#

Thanks.

raven bronze
#

My bot is really bad, I'm thinking about redoing it. Does anyone have a good color i should use for the embeds?

#

and/or logo

slim heart
#

Well for embeds you can make it RANDOM if you can’t come up with a nice one

west mountain
#

?

mossy vine
west mountain
#

thx

slim heart
#

@west mountain what?

west mountain
#

for links info ;

raven bronze
#

@slim heart I would like to make a theme not random, becuase it will fit our logo.

slim heart
#

Oh then what color theme are u aiming for?

mossy vine
#

use your logos color or the opposite of it? 🤔

raven bronze
#

@mossy vine We are remaking the bot, so we want to use a color other

mossy vine
#

yes but what color is your logo

raven bronze
#

right now its yellow

broken moat
#

!life

#

how to use life bot

mossy vine
#

wrong serevr

broken moat
#

i need help

mossy vine
#

go to the life bot support server

broken moat
#

were is it

mossy vine
broken moat
#

yes

mossy vine
#

click the "support server" button

#

on the page

raven bronze
mossy vine
#

third, just because im a hueg fan of purple

raven bronze
#

me too

bright spear
#

First imo

slim heart
#

Yeah first

raven bronze
slate kayak
slim heart
#

P r o g r a m I t ¿

raven bronze
#

you_arent_gonna_get_spoonfed_here.exe has stopped working.

mossy vine
#

do it on your own maybe

slim heart
#

That means we would spoon feed him

slate kayak
#

the funny part is @slim heart i did program it its just i cant get my radio stations to work properly with it

slim heart
#

Wdym-

#

“Radio stations”

slate kayak
#

just what im saying

slim heart
#

Soooooo. What is it?

slate kayak
#

exactly radio stations my bots are music bots and yeah i have added radio to my bots as i have paid for the links also and they are working

slim heart
#

So like literal radio stations?

slate kayak
#

its just it doesnt want me to add more than 1 because im struggeling to get my bot to let me choose what station

#

yes

slim heart
#

U h m

#

Like FM/AM stations

slate kayak
#

yes but they only play music

slim heart
#

Like literal FM stations

#

That exist in real life

slate kayak
#

yes

slim heart
#

That you can access with an antenna

#

I-

#

Ole

#

Ok*

#

Well that picture seems to be a song picker not a station picker

slate kayak
slim heart
#

I’m still extremely confused on what the problem is

raven bronze
#

can anyone help me setup mentions prefix

slate kayak
#

i cant get it so that i can choose wit a number

slim heart
#

Just make the prefix <@client-id>

#

well whatever api you’re using should take care of that?

raven bronze
#

@slim heart but I also want them to use the included prefix

#

($) [changeable]

#

so they could do " @placid silo setprefix !"

slate kayak
#

i did try that also @raven bronze but it still doesnt want me to

slim heart
#

Then make an array like [prefix1, prefix2] and then in your command variable remove the second prefix with it

#

@slate kayak one; I don’t think he was talking to you 2; depending on the api/package you’re using that’ll have whatever number pick it makes

vernal rivet
#

It's cause the loops aren't nested

slim heart
#

What

vernal rivet
#

He made more than 1 command called radio like 7 times

#

He can just do a nested if statements if args equals 1-7 then do this

slim heart
#

Yeah

raven bronze
#

Still confused on the prefix

slim heart
#

Willin to bet you can just google it

#
client.on("message", message => {
  const prefixes = ['!', '?', '/'];
  let prefix = false;
  for(const thisPrefix of prefixes) {
    if(message.content.startsWith(thisPrefix)) prefix = thisPrefix;
  }
  if(!prefix) return;
​
  // Go ahead with the rest of your code!
});```
@raven bronze ezgoogle
#

Well depending on what command is

#

How is your code made

#

Does it have a command variable

raven bronze
#

so whats the var for the command so "myCoolPrefix <command>" will output "<command>"

slim heart
#

Hhhh look up some bots and see how they make the ‘command’ variable

#

I gtg to class

raven bronze
#

ok

#

idk what you are asking

marble elm
#

🤔 thats got nothing to do with what im asking

raven bronze
#

ok so heres my code:

ot.on("message", message => {
  if(message.author.bot) return;
  let cmd = messageArray[0];

  const prefixes = ['$', 'g.', 'gimbo.', '@placid silo'];
  let prefix = false;
  for(const thisPrefix of prefixes) {
    if(message.content.startsWith(thisPrefix)) prefix = thisPrefix;
  }
  if(!prefix) {
    return;
  } else {
    if()
  }
});```
how do I make it so a command works here
marble elm
#

use else if() instead of else { if() }

raven bronze
#

nope not the point

#

how do I get the command var

#
} else {
      if (cmd === `mycommand`{
          message.channel.send("Oof.");
    }
}```
formal agate
#

Boi

#

How do you have a bot here, if you can’t even understand something like this?

earnest phoenix
#

he probably got an open source bot

#

and made a little change and broke it

#

🤦

marble elm
#

😂

formal agate
#

Lol

#

Then how did it get aproved

#

Or are the mods dumb

earnest phoenix
#

They didn't catch it I guess

#

or know the original bot

formal agate
#

Lol

earnest phoenix
#

Oh lovely

formal agate
#

Yt tutorial

earnest phoenix
#

My bot just got approved

#

😃

formal agate
#

Gg

earnest phoenix
#

yes YT tutorial haha

formal agate
#

👌

velvet ruin
#

Hello

#

who knows how to make the command lock for my bot discord in js?

#

to lock the living room

#

help me please... give code

earnest phoenix
#

You can't just insert code

#

like that and expect it to work

velvet ruin
#

if I can not find it and I really need it

#

do you have the code

#

thanks goodbye

formal agate
#

are people really this dumb?

uneven rover
earnest phoenix
#

This is rediculous

slim heart
#

Hhh yeah

#

Ever since I could answer basic djs questions and I started coming here sometimes just cuz I’m bored to help people I’ve lost faith in our future like 10x

marble elm
formal agate
#

reposting the same thing over and over, with no real question does nothing

raven bronze
#

Execuse me!? No I'm working on a new part of the bot with a diffrent prefix.

#

@formal agate @earnest phoenix

earnest phoenix
#

Yeah sure...

formal agate
#

lol

earnest phoenix
#

Then how do you not know anything you're doing

formal agate
#

^

earnest phoenix
#

and need help on that simple part...

formal agate
#

also

raven bronze
#

Husky, rule 1 is Don't be a dick. Please follow by that rule.

earnest phoenix
#

Don't try to leech off others then.

formal agate
#

if you knew what you where doing, you would know that multi prefix you where given does not work

earnest phoenix
#

^

formal agate
#

not trying to be mean

#

but, really, how? how could you not know

silver halo
#

was declined. Reason: Your bot has a publicly available token.

#

How do i fix this?

raven bronze
#

^^ remove the public token

formal agate
#

reset token

raven bronze
#

^

formal agate
#

also

#

where you host?

#

ill teach you how to get around that stuff

raven bronze
#

I asked for help in #development, but no one ever cares about me, and just bullyes me to the point where I am depressed all the time.

formal agate
#

No joke, why.

silver halo
#

How do you remove the token?

#

I can regenerate it

raven bronze
#

It kinda is mean.
Becuase I never used multi-prefixes

formal agate
#

where is the bots code?

#

@raven bronze google

#

ever heard of it?

raven bronze
#

i tried that

formal agate
#

kool

#

that gives you a good answer

silver halo
#

The code is on my GitHub

formal agate
#

link?

formal agate
#

@marble elm that does not work

marble elm
#

first result on google

silver halo
#

@formal agate

formal agate
#

kool

silver halo
#

Is it because the token is on there?

raven bronze
formal agate
#

edit the code

#

where are you hosting the bot??

#

@silver halo

silver halo
#

On a local server @formal agate

formal agate
#

Not on heroku, glitch or anything like that right?

#

because if you lie this will not work

silver halo
#

It's not

#

Im running it on my pc right now

formal agate
#

ok

#

dm??

silver halo
#

Im new to this kind of thing

formal agate
#

ok

#

i see that

#

we should fix a few things

fierce thorn
#

You shouldn't push your bot token on github

raven bronze
#

^

fierce thorn
#

Yeah and regenerate your token before someone does some bad things with it

raven bronze
#

^ yeah

marble elm
#

I currently have this for my HTML html <div class="moduleTitle">Title</div> <div class="moduleDesc">Description</div>
and this for my CSS css .moduleTitle { color: red; } .moduleDesc { color: green; }
Why does this not change the colour of moduleTitle (https://i.imgur.com/qBQwYCI.png)?

raven bronze
#

Try this

marble elm
#

That still wont work

#

Just got a solution 👍

raven bronze
#

great

faint junco
#

Is superagent good for apits

fierce owl
#

Discord.js Help

So I made a command for promoting bots and stuff on my server. You do !promote (message) and it will send it to a specific channel (promote channel)

The issue is that when it sends the msg, instead of spaces it uses commas.
For Example
!promote christmas is awesome

My bot says: christmas,is,awesome in the channel

My code is:

client.on('message', message => {
 if (!message.guild) return;
 var missingPermissionsEmbed = new discord.RichEmbed() 
 .setColor(embedColor)
 .setAuthor(message.author.username, message.author.avatarURL)
 .setTitle('Insufficient Permissions!')
 .setDescription('You need the `ADMINISTRATOR` permission to use this command!')
 .setTimestamp();

 if(!message.member.hasPermission('MANAGE_MESSAGES')) return message.channel.send(missingPermissionsEmbed);
 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)
  }
  })

Can anyone help?

fallen oak
#

.join(" ") the string

fierce owl
#

for my code or for when i request it to run the command?

fallen oak
#

In your code

fierce owl
#

where?

#

give example please

fallen oak
#

I think ${id} is where your "christmas is awesome" would be so try ${id.join(" ")}

fierce owl
#

ok i will try, thanks!

raven bronze
#

@fierce owl
I would recommend sending it in an embed it looks nicer:

let promo = new Discord.RichEmbed()
    .setColor("#4999f0")
    .setTitle(`Your message here! And ${var}`);
message.channel.send(promo);```
fierce owl
#

ok

sick cloud
#

that wouldn't work

#

also don't use embeds for everything

fierce owl
#

i know

#

but I do like them alot

sick cloud
#

users can disable embeds

#

and they look odd on mobile when they have lots of content

raven bronze
#

also add a -noembed feature

!promote <message> -noembed

fierce owl
#

ok

sick cloud
#

thats just more pain

knotty steeple
#

ok hi im having a problem with my command on my bot

#

i want it to take the last arg when someone runs the command but it takes the second to last one

keen drift
#

c0de

knotty steeple
#

msg.channel.createMessage(args.pop())

#

eris (javascript)

keen drift
#

show args content

knotty steeple
#

huh

keen drift
#

show the contents of arg

knotty steeple
#

ok wait

#

@keen drift

keen drift
#

yeah makes sense

#

is that after pop or before

#

u doesn't seem to be included

knotty steeple
#

oH wait

#
console.log(linkRegex.test(args.pop()))
msg.channel.createMessage(args.pop())``` could this be why
#

a

heady zinc
#

yes

knotty steeple
#

well then

heady zinc
#

i recall pop modifies the original array, so when you send the message, the last element is no longer u

knotty steeple
#

ooh

#

makes sense

#

so what do i do

heady zinc
#

you don't log it mm

#

or simply do js let lastArg = args.pop();

knotty steeple
#

but i still have to do the linkregex thing

#

ok

keen drift
#

or just list[list.length - 1]

heady zinc
#

fishy pls

earnest phoenix
#

What is important that people are directing me here

knotty steeple
#

what

fierce owl
#

Discor.js help

So I wanna log what what bot does (kicks, pms, promotes)
how would I do it?

knotty steeple
#

kicks?

valid frigate
#

guildMemberRemove event or something

knotty steeple
#

yes but

#

be specific

#

it could be bot kicks

valid frigate
#

how would you work out pms

near lintel
#

:^)

fierce owl
#

@valid frigate @knotty steeple Thtas just commands I have, but I want to have the bot put a message in a log channel when the commands are used

knotty steeple
#

uh

#

console.log(someone did this with args also this i guess)

#

after they run it

fierce owl
#

ok

raven bronze
knotty steeple
#

uh

#

fix what

sick cloud
#

.join(' ');

bright spear
#

theres an issue in ur eval code

valid frigate
#

your arguments are ['>$eval', '"OOF', 'w0w"']

#

and you probably join them with a , so that's why

earnest phoenix
#

Am allowed to have a "Command not found" error here? (it sends an error when someone tries to execute a non existing command)

knotty steeple
#

no

#

also its bad practice

earnest phoenix
#

thought so

#

and wdym

#

bad practice/

#

?*

bright spear
#

bad practice = something u shouldnt do

fierce owl
#

lol

earnest phoenix
#

o

#

But if I make it auto delete after, lets say, 5s?

knotty steeple
#

no

#

just

#

dont do it

fierce owl
#

how do i send a message to a channel when a command is used. Basically logging it

bright spear
#

what lib

knotty steeple
#

i already told you what to do

quartz kindle
#

there are thousands of bots, so eventually there will be something out there with the same prefix as you, and your bot will be spamming "command not found"

bright spear
#

oof

fierce owl
#

discord.js

earnest phoenix
#

alright..

bright spear
#
client.channels.get('CHANNELID').send('message')```
limber swan
#

Question

case (msg.content.startsWith(config.prefix + "autorole")):
        let oldRole = message.guild.autorole
         if (!message.args[0]) {
         if (oldRole !== false) {
        bot.config.setAuto(message.guild.id, false);
        return message.send("**Autorole has been disabled.**")
        } else {
        return message.send('**Please provide a role for autorole.**')
        }
     }
        if (message.mentions.roles.first()) return message.send("**Type the role name instead of mentioning it**")
        if (!message.guild.roles.exists('name', message.suffix)) return message.send("The role **"+message.suffix+"** does not exist on this server.");
        if (message.guild.roles.find('name', message.suffix).position > message.guild.member(bot.user).highestRole.position) return message.send("**I cannot assign a role that is higher than my highest role.**");
        bot.config.setAuto(message.guild.id, message.suffix);
        message.send("The role **" +message.suffix+ "** will now be assigned to users when they join your server.")
    }```
Is this okay? Because it isnt working
bright spear
#

be specific

limber swan
#

When i run the command it doesnt work.

bright spear
#

why do you have a mix of message and msg ThinkEyes

#

also "message.send"

#

did you just copy paste that code

limber swan
#

no.

bright spear
#

or did you actually write it

fierce owl
#

message.channel.send

#

but can someone answer my question

quartz kindle
#

we already did?

knotty steeple
#

twice

fierce owl
#

thats only how you find the specific channel and send the message

#

not how to log it

#

when a command is used

quartz kindle
#

what do you mean lol

knotty steeple
#

what the fuck

#

how do i send a message to a channel when a command is used. Basically logging it

#

send a message to a channel when a command is used

quartz kindle
#

when a user uses a command, send a copy of it to the log channel?

fierce owl
#

no when a user uses a command send an message

#

for example

knotty steeple
fierce owl
#

if some kicks someone

the bot sends (user) was kicked from the server by (person)

#

yeah well you didn't explain anything there

knotty steeple
#

listen for events

quartz kindle
#

we already told you lol, channels.get(id).send()

#

just put it inside the ban command

knotty steeple
#

someone is your user

quartz kindle
#

like, at the end of the ban command, send it to a channel

knotty steeple
#

this is your command

#

args is whatever they put after the command

fierce owl
#

ah i see

knotty steeple
#

common sense

fierce owl
#

lol

#

dont bully a noob

vernal rivet
#

but it really isnt that common

#

how would you expect a person that is new to discord bot development to know that, lol its not common to them,lol

bright spear
#

if you have logic and know the language it should be common

vernal rivet
#

not really

#

to you yes, cause you know how it works, but not to new people

#

its like playing a instrument, the musician thinks its common sense to put left on top and right on bottom on a woodwind instrument, but to someone how is complete new to it, wouldn't think its common sense cause they don't know that. same thing here, you think its common sense that args comes after the command, cause you learn it and been doing it for a long time. but to someone who is complete new to it wouldn't know, cause they never learn that, lol

knotty steeple
#

fucking why

knotty steeple
#

uh

vernal rivet
#

common sense

knotty steeple
#

im trying to post to dbl's api with

#

request.post("https://discordbots.org/api/bots/stats", {form: {"server_count": boat.guilds.size}, auth: {"Authorization": boat.config.dbl_token}})

#

but

#

i get an error

vernal rivet
#

its invaild

#

your auth is passing paraments of user and password for auth

knotty steeple
#

what

vernal rivet
#

common sense. read the error, and look at what it is saying to your

#

its supposed to take in two paraments, user and password

bright spear
#

"paraments"

knotty steeple
#

but its not?

bright spear
#

@knotty steeple authorization is a header not auth

vernal rivet
#

-_- read the error please and tell me thats not what it is saying

knotty steeple
#

im not fucking blind

#

i have read the error

vernal rivet
#

and what advaith said authorization is a header not auth

lusty dew
#

I'm questioning things @vernal rivet did you even know that?

#

👀

vernal rivet
#

actually yes and no

lusty dew
#

Lmao

vernal rivet
#

i read errors and understand them more than actually programming problems. and the paraments are user and password for auth, and its saying that auth has received an invalid user or password, so its kinda of makes sense if he didn't use auth right

knotty steeple
#

i also make paragraphs to say im smarter than everyone

#

but

#

it was wrong option

vernal rivet
#

i am not smarter than people, theres people smarter than me, i just learn from people and self-learn, but i can be wrong, like multiply times.

fallen oak
#

Do I need to do the server count thing for the website? Cuz I can't get it working, I get an error: unauthorized when using one of the templates in the my ready event

vernal rivet
#

for?

quartz kindle
#

you dont need it, but its nice to have, and makes your bot look better

bright spear
#

401/unauthorized means you didn't provide a token/API key

earnest phoenix
#

When I uploaded it it moved it to assets

bright spear
#

@earnest phoenix you'll need to add the favicon code to your html

#

Glitch doesn't support uplaoding files like that

earnest phoenix
#

Ah, could you provide that?

bright spear
#

Just Google code for favicon

earnest phoenix
#

alright, thanks.

#

I'll see if it works

bright spear
#

It should be something mentioning shortcut-icon

earnest phoenix
#

where would i put it in the html?

quartz kindle
#

head

earnest phoenix
#

so right below head

#

and above <title>?

quartz kindle
#

for example yeah

#

anywhere inside head

earnest phoenix
bright spear
#

Try https instead of http

quartz kindle
#

can you even define a remote favicon?

#

why not a relative url?

bright spear
#

Also you should probably fix the issue on line 21 but that shouldn't affect it

earnest phoenix
bright spear
#

@quartz kindle yeah you can, and the glitch UI doesn't support uplaoding files

earnest phoenix
#

still the same thing

bright spear
#

Check the browser console

earnest phoenix
#

?

bright spear
#

No

#

The console in your browser

#

Not in glitch

earnest phoenix
#

like inspect element?

bright spear
#

Yeah there's a console button at the top of devtools

#

Inspect element opens the elements tab in devtools

earnest phoenix
#

ah

quartz kindle
#

doesnt support https

bright spear
#

Try using the glitch cdn url

earnest phoenix
#

idk what that is

bright spear
#

Click the image in the assets thing

#

It should give u a glitch cdn url

earnest phoenix
#

do i add the file again?

#

like that?

#

then what do I do with it

#

oh

#

nvm

#

figured it out, thank you for your help.

#

greatly appreciate it.

bright spear
#

Yw

raven bronze
#

How do i host a bot with glitch

earnest phoenix
#

well

bright spear
#

What language is it in @raven bronze

raven bronze
#

@bright spear js (discord.js)

bright spear
fallen oak
#

Look into the free tier of AWS

last ferry
#

i had that but i needed more than 512MB ram

#

so i had to get the 1gb version

raven bronze
#

@bright spear ok i uploaded and followed all the steps

#

now what?

bright spear
#

Wdym now what

#

It should be running

#

You can check logs

blazing star
#

Weird, for some reason my webhook is showing that it’s the weekend thonk

bright spear
#

@earnest phoenix what bot

#

@blazing star weekend = Friday - Sunday in whatever time zone

blazing star
#

oh thx

bright spear
sick cloud
#

just make sure it doesn't DM lul

blazing star
#

lul

earnest phoenix
#

Anybody know a good discord.js bot host less then $10 per month?

sick cloud
#

any VPS provider

#

just you have to install node.js on it

earnest phoenix
#

@earnest phoenix DigitalOcean

jagged birch
#

Vpsdime is really good @earnest phoenix

earnest phoenix
#

I’ve never heard of it but I’ll look into vpsdime

spring ember
#

You should also check out scaleway

#

They have amazing low cost VPSes

#

like 4 euro for 2 cores 4gb ram and 50 gb ssd

valid frigate
#

i just go with the flow and use DOmmLol

#

also bc $100 hacktober credit + $50 github student pack

earnest phoenix
#

What’s the "init" system?

#

@valid frigate well it's the best host after AWS

#

So you're on the good side

worthy iron
#

Why is my bot not sending messages here?

#

I went to #commands and used the command j!help and it didn't work here. It works on my server just fine.

coral trellis
#

It may have been muted

worthy iron
#

Why?

#

I dont see why it would be muted

worthy iron
#

hmmm... what did it respond to?

coral trellis
#

To other bots

worthy iron
#

I know but what exactly did it respond to

#

I need to know so i can fix it

coral trellis
#

What lib are you using?

quartz kindle
#

just make it ignore bots

worthy iron
#

I think i already have it fixed

languid dragon
#

const dont = () => {
    throw new Error("( ͡° ͜ʖ ͡°)");
}

if (message.author.bot) {
    return dont();
}
#

good for debugging

quartz kindle
#

lmao

heady zinc
#

excuse me sir

#
global.dont = () => {
    throw new Error("( ͡° ͜ʖ ͡°)");
};```
languid dragon
#

im not proud to admit

#

but my bot used to use everything as globals

#

when i was a lil n00b boi

quartz kindle
#

everyone did that at some point

heady zinc
#

understandable tbh

#

i didn't

languid dragon
#

just said that in voice lmaoooo

quartz kindle
#

lies

earnest phoenix
#

sa

last ferry
#

sa

raven bronze
#

@bright spear my bot stops after a minute

#

^ on glitch

raven bronze
#

nvm ^

#

fixed

loud salmon
#

hey @queen violet you are the only jda dude i know, ever had this pop up in your console?

#
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:505)
    at org.json.JSONObject.<init>(JSONObject.java:214)
    at org.json.JSONObject.<init>(JSONObject.java:357)
    at net.dv8tion.jda.core.requests.WebSocketClient.handleBinary(WebSocketClient.java:944)
    at net.dv8tion.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:901)
    at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:368)
    at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:270)
    at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:990)
    at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:749)
    at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
    at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
    at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
#

i have no idea what the fuck is happening

#

its not passing through any of my code

raven bronze
#

It looks like you have a syntax error.

loud salmon
#

its not my code though that is erroring

#

i dont deal with websockets

raven bronze
#

neither do I, but I think i have gotten this error before.

#

i would check A JSONObject text must begin with '{' at 1 [character 2 line 1], if not idk.

dreamy breach
mossy vine
#

inline: true

dreamy breach
#

So with jda?

mossy vine
#

no idea with jda

dreamy breach
#

Okay ty, will search

loud salmon
#

@dreamy breach you would have to set the inline variable to true

#

when you add a field using the embedbuilder

heady anvil
#

so whenever you add a field in jda you do embedbuilder#addfield(string, string, boolean)

#

you want that boolean to be true

raven bronze
#

yes

#

.addField("Title", "desc", true)

dreamy breach
#

Oh okay ty so much 🤗

rigid crane
#

What is the webhook of the dblapi?

raven bronze
#

ok, right so, my bot trys to find the server owner, but returns "undefined"

#
addField(`Server Owner`, message.guild.owner, true)```
#

^ but it works on my servers

junior hornet
#

Does any one here know how to write a music play and stop command in JavaScript

late hill
#

What lib Tehcno

raven bronze
#

@late hill Discord.JavaScript

junior hornet
#

Yes

late hill
#

My first guess would be that owner is an object

#

So you probably want to display owner.tag

#

?

late hill
#

owo

raven bronze
#

only this server dosnt work

sick cloud
#

owner isnt cached

#

use ownerID to get the user

raven bronze
last ferry
#

Get the owner with the id

#

Then set that to the embed

sick cloud
#
const owner = msg.guild.members.get(msg.guild.ownerID);

// ...
.addField('who owns this place', owner.user.tag, true)```
late hill
#

xd

last ferry
#

Yes

sick cloud
#

especially in big servers caching will prove annoying

raven bronze
#

^^^^ that broke it

late hill
#

because you use message

#

So just copying his example won't work

raven bronze
#

yes i know that

late hill
#

What broke then

raven bronze
#

still not working

sick cloud
#

no error = no help

raven bronze
#
    at Client.emit (events.js:182:13)

    at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)

    at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)

    at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)

    at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)

    at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:120:16)

    at WebSocket.emit (events.js:182:13)

    at Receiver._receiver.onmessage (/app/node_modules/ws/lib/websocket.js:137:47)

    at Receiver.dataMessage (/app/node_modules/ws/lib/receiver.js:409:14)

(node:10656) 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: 4)

late hill
#

The top?

sick cloud
#

we need the actual error

late hill
#

😂

sick cloud
#

the bottom half of the stack doesn't do shit

raven bronze
#

@earnest phoenix ?

earnest phoenix
#

ok

#

wait

#

use

dreamy breach
late hill
#

New Date()

#

or new

#

idk

earnest phoenix
#

where code

#

@raven bronze

dreamy breach
#

With jda

late hill
#

oh

raven bronze
#

(node:11515) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of undefined

earnest phoenix
#

send the code

#

with this link

lament meteor
#

pls... learn js @raven bronze

earnest phoenix
#

you have errors

dreamy breach
earnest phoenix
#

yes...

#

@raven bronze dont say you only copied your code

#

...

late hill
#

means .user is undefined

dreamy breach
#

Someone has an idea to get current timestamp of Discord with jda. I already try that but it said that it needs TemporalAccessor : http://prntscr.com/lv0q6k

Lightshot

Captured with Lightshot

late hill
#

Does just putting new Date() not work?

sick cloud
#

its java

#

not js

raven bronze
#

this is prob a stupid question, but what are "shards"

sick cloud
#

As bots grow and are added to an increasing number of guilds, some developers may find it necessary to break or split portions of their bots operations into separate logical processes. As such, Discord gateways implement a method of user-controlled guild sharding which allows for splitting events across a number of gateway connections. Guild sharding is entirely user controlled, and requires no state-sharing between separate connections to operate.

#

basically it splits ur bot into multiple bots/"shards"

#

joined by a controller

late hill
#

Date exists in java?

dreamy breach
#

Yep with DateFormat

#

But i don't know how to change that to a timestamp

raven bronze
#

it dosnt make sense (the shards), how and why would you use them?

sick cloud
#

read what i linked

#

all libs implement sharding diff

#

but shards are for performance and shit

#

if you dont understand ask dapi

velvet ruin
#

Hello

dreamy breach
#

hey

velvet ruin
#

Dou you have bot ?

#

Who has the lock command for java channels? for my bot

bright spear
#

What...

#

We're not gonna code something for you

raven bronze
#

-bots @velvet ruin

gilded plankBOT
#
[\ XPOL /]#6107
Bots

@high swallow

velvet ruin
#

Hey @bright spear

raven bronze
#

i can help you with bot dm me

velvet ruin
#

ok private pass

bright spear
#

@velvet ruin don't randomly mention people

velvet ruin
#

Okay

raven bronze
#

Alright will anyone help me and @velvet ruin

#

heres our code

wide ruin
#
const d = require('discord.js')

module.exports.run = async (message, text, admins, bl) => {
   message.guild.leave()
}```
raven bronze
#

?

wide ruin
#

why doesnt the bot leave?

#

no errorsa

#

errors*

raven bronze
#

use

#

message.guild.leave();

#

not message.guild.leave;

wide ruin
#

?

raven bronze
#

you need semicolon

#

";"

#

at end

wide ruin
#

it does...

#

ok

#

juat gonna test

#

just*

#

didnt work

raven bronze
#

hm

wide ruin
#
const Discord = require("discord.js");
const client = new Discord.Client();
const admins = ['438733159748599813']
const bl = ['']
const ms = require('ms')
const token = process.env.Token
const fs = require('fs');
const p = '@strange tulip'

const commands = {};
fs.readdirSync('./commands/').forEach(file => {
    commands[file.substring(0, file.length - 3)] = require('./commands/' + file);
});

client.on('message', async(message) => {
  if(message.content.startsWith(p)){
    let text = message.content.split(p)
        if (commands[text] != null) {
            commands[text].run(message, text, admins, bl)
        }
  }});```
#

this in server.js

#

(+ ready under it)

#

@raven bronze

knotty steeple
#

the ; isnt important

#

so adding that fixes nothing lmao

wide ruin
#

so whats wrong with it?

#

anyone?

night imp
#

Is the command running?

#

(use console.log)

#

If it's not then your execution is wrong

#

@wide ruin

inner jewel
#

@dreamy breach if you want the current time, use OffsetDateTime.now()

dreamy breach
#

Wow ty ❤

grave mist
#

A guy using ipad voted my bot when I check using .hasVoted , it says he didn't vote

#

I voted in my pc and I used the same code but it says I voted

#

Anyone knows the cause?

inner jewel
grave mist
#

Yea a computer never fails in counting but a phone can

#

Then why isn't it working?

#

When he try to vote again it says you already voted

#

And in api it says he didn't

#

It's like 2 hours after he voted

raven bronze
#

Hey! So for some reason my guild add event dosnt work. How can I make it update the gmae to say
pt!help | 0 Servers and when someone adds the bot, pt!help | 1 Servers

west raptor
#

you can set a interval to update guild count in your ready event

#

if your bots grows a lot it wouldn't be a good idea to put it in a guild add event

weary zodiac
#

Someone wanna help me with the css rainbow name and animated profile picture on the website/?

desert bough
#

rn my bot crashes and I cannot find the error bcuz the console window closes on crash, is there a way I can write everything that appears in a console window to a log file to read?

quartz kindle
#

your console wont close if you run your bot from within it

lofty hamlet
#

Hi

#

I have a problem

#
                        Dresseur.LSac.push('🎅')
                        message.channel.send(`Noël activé vous gagnez le badge 🎅 en plus du coffre car vous ne l'avez pas (Badge seulement gagnable jusqu'au 25)`)
                    }```
#

My code

#
                                         ^

TypeError: Dresseur.Badges.content is not a function
    at Client.client.on.message (/home/Akimitsu_Dev/pokemon.js:1022:42)
    at emitOne (events.js:116:13)
    at Client.emit (events.js:211:7)
    at MessageCreateHandler.handle (/home/Akimitsu_Dev/node_modules/discord.js/s
    at WebSocketPacketManager.handle (/home/Akimitsu_Dev/node_modules/discord.js
    at WebSocketConnection.onPacket (/home/Akimitsu_Dev/node_modules/discord.js/
    at WebSocketConnection.onMessage (/home/Akimitsu_Dev/node_modules/discord.js
    at WebSocket.onMessage (/home/Akimitsu_Dev/node_modules/ws/lib/event-target.
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
#

My error 🔼

#

@quartz kindle the last time you have help me for a similar error you can help me plz ?

#

Or other people

west raptor
#

Content is not a function, it's a property. you can see if it equals something (==/===)

lofty hamlet
#

?

#

I replace wath

#

I want the trainer's badges do not contain: santa: then

#

Is it not work

#

@west raptor

west raptor
#

it would be js if (Dresseur.Badges.includes !== '🎅') {

#

fuck

lofty hamlet
#

I know but he doesn't work

#

He give me the badge all the time

quartz kindle
#

the first one you did is correct

#

if (!Dresseur.Badges.includes('🎅'))

lofty hamlet
#

No it's not work

#

No look error @quartz kindle

quartz kindle
#

that error is not there

#

the error is .content

#

where do you have .content?

#

.includes is correct

lofty hamlet
#
                        Dresseur.LSac.push('🎅')
                        message.channel.send(`**__Noël activé vous gagnez le badge 🎅 en plus du coffre car vous ne l'avez pas (Badge seulement gagnable jusqu'au 25 Décembre)__**`)
                    }```
#

Actually my code