#development

1 messages ยท Page 537 of 1

lofty hamlet
#

But he give me the badge all the time

keen drift
#

What's on L1022

quartz kindle
#

that includes is wrong

lofty hamlet
#

?

fair sage
#

How do you make the number of servers or the bot there?
Thank you for answering me ๐Ÿ˜ƒ

keen drift
#

your original include is correct

#

@fair sage posting to the api

quartz kindle
#

correct includes -> !Dresseur.Badges.includes('๐ŸŽ…')

fair sage
#

Ah

lofty hamlet
#

I test this

#

Thanks @quartz kindle โค

#

I love you

keen drift
#

kek

#

that's what you had originally

lofty hamlet
#

Yes ๐Ÿ˜‚

#

I know

limber swan
#

Someone uses SkySilk? Because I'm having problems maintaining the bot online

keen drift
#

@limber swan yeah but I don't use it for my bot

earnest phoenix
#

I need some help with my VPS

#

trying to set-up my bot, but having some issues.

#

Is here someone common with using Ubuntu 16.04?

limber swan
#

@keen drift alright

#

I fixed my problem

stray wasp
#

anyone else not able to access message.guild.owner on this server?

#

Cannot read property 'user' of undefined

bright spear
#

yeah owner is null for me

#

it usually is

stray wasp
#

werid

raven bronze
#

^ yeah me too

#

How can I get the shard of the bot on the server? (I have 10 shards)

bright spear
#

well it depends on what lib ur using

raven bronze
#

js

bright spear
#

thats not a lib

#

js is a language

raven bronze
#

discord.js

#

oh

#

how do I find a lib?

bright spear
#

oh

#

discord.js is a lib

raven bronze
#

oh ok

bright spear
#

are you using internal or external sharding

raven bronze
#

wdym?

bright spear
#

r u using ShardingManager

raven bronze
#
const Discord = require('discord.js');
const Manager = new Discord.ShardingManager('./app.js');
Manager.spawn(5);``` yes i think
bright spear
#

k so thats external

#

lemme check docs

#

cuz i use internal

#

stable or master btw

raven bronze
#

whats the diff? how i find

keen drift
#

prob stable

bright spear
#

whats ur package.json entry

raven bronze
#

for what

bright spear
#

discord.js

keen drift
#

it's def stable

#

lmao

bright spear
#

lol

raven bronze
#

"dependencies": {
"discord.js": "^11.4.2",
"request": "^2.88.0",
"tiktok-api": "^0.4.0",
"express": "^4.16.3"
}

  • ingnore tiktok-api
bright spear
#

hm how do u do it for external

raven bronze
#

should I be using internal? if so how

bright spear
#

nah you'll need to upgrade to 12 and change a bunch of code

#

external is fine its just that im not very familiar with it

#

internal is easier to use but ive heard external sometimes has better performance

knotty steeple
#

@earnest phoenix u still need help

bright spear
#

how many servers is ur bot even on ThinkEyes

knotty steeple
#

under 50

raven bronze
#

around 20

bright spear
#

...

#

dont shard that early

knotty steeple
#

you dont have to shard

bright spear
#

pls

raven bronze
#

need to be prepared tho

knotty steeple
#

you know that right?

bright spear
#

no u dont

raven bronze
#

dont ask me why

bright spear
#

if ur running 10 shards on 20 servers ur wasting server resources and spamming discords api

raven bronze
#

im using 5 shards.

inner jewel
#

How can I get the shard of the bot on the server?
shard_id = (guild_id >> 22) % shard_count

bright spear
#

ah

#

whered u get that zoomeyes

inner jewel
#

but since you're using js that method isn't that simple

#

because js fucks numbers greater than 2^53

#

actually

#

@bright spear discord docs

earnest phoenix
#

@knotty steeple yeah, can't dm you tho

knotty steeple
#

what do u need

raven bronze
#

so

let shard_id = bot.shard.id;
message.channel.send("Using shard" + shard_Id + "!");```
earnest phoenix
#

I already added my bot to the VPS, but have some issues before starting it

#

I also installed npm/node.js on it

bright spear
#

ah hes right

#

@raven bronze yes but in one place u have id and in one place u have Id

knotty steeple
#

what is the issue

#

also use template literals pls

bright spear
#

^

raven bronze
#
let shard_id = bot.shard.id;
message.channel.send("Using shard" + shard_id + "!");``` 0w0
knotty steeple
#

so

#

`Using shard ${shard_id}!`

raven bronze
#

yeah

earnest phoenix
#

I changed some things rn, and re-uploading them on the FTP. I'll tell you in a minute where is the issue

knotty steeple
#

or

bright spear
#

also texus dont dm people unless they ask u to dm them ok_hand_skin_tone_4

earnest phoenix
#

lmao

#

aight

knotty steeple
#

just do bot.shard.id

#

instead of making it a var

bright spear
#

^

raven bronze
#

eh

#

sometimes those dont apply

bright spear
#
message.channel.send(`Using shard ${bot.shard.id}!`)```
#

readable code

raven bronze
#

thanks:

#

!*

knotty steeple
#

want readable code

#

use coffeescript

raven bronze
inner jewel
raven bronze
#

i already have made my bot almost entily using js

knotty steeple
#

coffeescript is js

#

just google it

bright spear
#

tbh i knew about java the programming language way before i heard about java the drink

knotty steeple
#

same

raven bronze
#

soooo

#

help:

#
 UnhandledPromiseRejectionWarning: Error: Shard 0's process exited before its Client became ready.

    at Shard.once (/app/node_modules/discord.js/src/sharding/Shard.js:88:39)

    at Object.onceWrapper (events.js:273:13)

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

    at Shard._handleExit (/app/node_modules/discord.js/src/sharding/Shard.js:272:10)

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

    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)

(node:14805) 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: 38)```
inner jewel
#

look at shard 0's log

raven bronze
#

nvm

#

found the problem ๐Ÿคฆ

#

i used et instead of let

raven bronze
#

how do i get a custom emoji from another server

#

in a msg

#

*on the bot

bright spear
#

wdym get the emoji

raven bronze
#

offline and online , are from another server, i have nitro, but how do i show them in a message by my bot

bright spear
#

the bot has to be in the server

raven bronze
#

so

Shards:
:online: Shard 1
_21ms_
:offline: Shard 2
_0ms_```
bright spear
#

its the same as using a custom emoji in the same server

#

but the bot cant use an emoji if its not in the server with it

ruby dust
#

You have to put the full emoji string into the message, and with your discord client it's possible to do it by adding \ before the emote

raven bronze
#

just use that?

ruby dust
#

Yeah

#

That's the full emoji string

raven bronze
ruby dust
#

BTW, that's what's actually being sent on discord, not the :emote: thing

raven bronze
#

its not working and wdym

#

@ruby dust

#
.addField(`![online](https://cdn.discordapp.com/emojis/523314242284158986.webp?size=128 "online") Shard 1`, `${shard_num}`)```
ruby dust
#

It's gotta be in that server too

raven bronze
#

how do i get it from another server

ruby dust
#

What

bright spear
#

as i said the bot has to be in the server with the emote @raven bronze

raven bronze
#

how do i get a emoji from another server

ruby dust
#

...

bright spear
#

can you read

ruby dust
#

Do you know the source of that emote that you have pasted into your code?

#

Like the guild that it belongs to

raven bronze
#

yes

ruby dust
#

Does that guild have your bot there?

raven bronze
#

yes

ruby dust
#

Are you sure you aren't just getting the same emote from some different server

#

Double check that

raven bronze
#

my bot's command dosnt work

bright spear
#

be specific

#

"doesn't work" doesn't tell us anything

ruby dust
#

Pretty sure just switching topics

raven bronze
#

the >$shards command gets a offline/online emoji from a private server i setup, with my bot, and sends shard statuses, using the emojies, if the shard is online it shows a green dot emoji if its offline then it shows red dot emoji. the green dot isnt included so i must include a custom one.

#

@bright spear / @ruby dust same topic, i meant >$shards command dosnt work and that one is the one that uses the emojies

bright spear
#

what do you mean doesn't work

#

it doesnt respond?

raven bronze
#

it breaks that shard

bright spear
#

or theres an issue in the message

#

wdym breaks

#

screenshot it

raven bronze
#

stops it

lament meteor
#

like send code

raven bronze
#

0w0

#

dms

ruby dust
#

Yeah, screenshot the shard

lament meteor
#

uh...

#

that is dumb

#

now people can break your bot

ruby dust
#

Sharding on glitch?

lament meteor
#

also that

raven bronze
#

stop, dont ask.

#

0w0

#

@lament meteor right thats why im asking 4 help

lament meteor
#

.... read what my message says

raven bronze
#

wdym

ruby dust
#

I think I have just found your token

#

Not sure though

lament meteor
#

be happy im just watching... people can take your token, delete your code

raven bronze
#

hmf

#

i have a backup ๐Ÿ˜›

ruby dust
#

A backup token?

raven bronze
#

backup file

lament meteor
#

sharded bot

1 file bot

raven bronze
#

i asked for help with emojis not your personal thoughts on sharding

ruby dust
#

I gotta say, my single purpose bot that only needs 1 shard uses 5 different loaded modules

raven bronze
#

I ASKED FOR EMOJI HELP, how come it not work 0w0

ruby dust
#

We've already answered your emoji issue

#

It's either bot is not in guild

#

Or you fucked up the full emoji string

raven bronze
#
.addField(`![online](https://cdn.discordapp.com/emojis/523314242284158986.webp?size=128 "online") Shard 1`, `${shard_num}`)```
bright spear
#

@raven bronze move ur token to .env right now

#

ur token is ur bot's password

raven bronze
#

^ it is

bright spear
#

how did they see it tho

raven bronze
#

w0w i gave a edit link

#

let me deny it xD

ruby dust
#

If you are sure that this is a correct emoji string, then bot is not in the correct guild where the emoji actually belongs to

raven bronze
ruby dust
#

You may not be the only one guild having that emoji with the same name as well

raven bronze
#

<online523314242284158986>

#

i put the id tho

#

should I change it to :online2939239283923829382398: or something lmao

ruby dust
#

Wait I've just fucking realized

#

You are trying to put an emoji in the title

raven bronze
#

yes?

ruby dust
#

That's the reason

#

Try to put like in description

bright spear
#

it should work in the title ThinkEyes

#

it def shouldnt crash the bot

#

@raven bronze if it crashes its probably not related to the emoji

raven bronze
#

really u think

#

ok the shards are all online let me try some commands

ruby dust
#

It's not up to the bot to render what you see in the client, the bot does it's part to send the message to discord, emoji has nothing to do with crashes

bright spear
#

might be a bug in the shards command

#

it should have logged the error

raven bronze
#

waiiiiit

#

i use shards

#

diffrent shards

#

๐Ÿคฆ

#

how do i fix that

#

How can I use emojis from diffrent shards*

ruby dust
#

It doesn't matter on which shard you are

#

The most important thing is that the bot is in the server where the emoji belongs to

raven bronze
#

...

#

i think it does

ruby dust
#

You then think incorrectly

#

Again, your bot's job is to send an emoji string, and it's discord's job to render it into an emoji depending if the account is part of the respective guild

bright spear
#

yes, the shard does not matter

raven bronze
#

well why it not work then

bright spear
#

if the bot crashes when you run the command, it is not related to the emoji

#

you need to look at the logs

#

and find the issue

lament meteor
#

Logic

raven bronze
#

Cool! Okay it worked now

bright spear
#

uhhh

#

ok

raven bronze
#

Wait now the command is broken

lament meteor
#

stop saying "command is broken". show what went wrong like an errors, permissions and the code

bright spear
#

^

#

"broken" doesnt tell us anything

raven bronze
#

The command has stopped working on all shards, and no-longer shows the appropriate embed for shard data. The command had "worked" once, and then broke. Broke refers to not working, or not what was coded or expected.

bright spear
#

we know what broke means wtfpalm

#

but we can't tell what the issue is if you just say its broken

#

and you need to send the command code

lament meteor
#

...

raven bronze
#

this is the past console logs

#
Gimbo is now online [1/5]


Gimbo is now online [1/5]

Gimbo is now online [2/5]


Gimbo is now online [1/5]


Gimbo is now online [1/5]

Gimbo is now online [2/5]

Gimbo is now online [3/5]

Gimbo is now online [4/5]

Gimbo is now online [5/5]```
lament meteor
#

error log

raven bronze
#

Nvm, the command is now "working", by working I am refering to what is exepected and/or planned to what I had coded in my app.js filesheet. The command is no longer broken, or not working as expected or coded. - Sorry just had to :P. My next issue, is how do I actually check the shards online/offline status?

slim heart
#

By shard ID?

#

Or do you want to make like an array of offline and online

sick cloud
earnest phoenix
#

help html

mossy vine
#

What

quiet flare
#

Can you help with html to this friend?

#

Please.

mossy vine
#

Html? Yeah i guess

quiet flare
#

He's a Turk himself. Translate TR

earnest phoenix
#

ฤฐ am go to google translate

mossy vine
#

What is the issue?

earnest phoenix
#

Some avatar movement in site

mossy vine
#

That is css which i cant help with

quiet flare
#

hmm

shadow barn
earnest phoenix
#

maybe it works

sick cloud
#

no

#

i worked it out anyways

#

needed this

quartz kindle
#

segmentation fault can happen if your bot is using corrupt files or if it runs out of memory due to an infinite loop

knotty steeple
#

@raven bronze why are you

#

sharding

#

"preparing" dont give me that shit ur on 20 servers

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

module.exports.run = async (message, text, admins, bl) => {
 let e = new d.RichEmbed()
 .setTitle(`User info for ${message.mentions.first()}`)
 message.channel.send(e)
}```
#

d.js

#

this gives an error

#

`(node:11756) 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:11756) [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.`

#

all i type is + user @wide ruin

#

i added a console.log, but it just gave the same error

knotty steeple
#

well

#

thats not how you get a mention

wide ruin
#

isnt it meant to have a .users

knotty steeple
#

you know that why didnt you put it

#

also why are you in an async function

#

you dont need it

wide ruin
#

what should it be?

knotty steeple
#

a normal one?

wide ruin
#

yeah

#

?

#

@knotty steeple

knotty steeple
#

y e s

wide ruin
#

what is it?

knotty steeple
#

what

wide ruin
#

the module exports run without async

knotty steeple
#

remove the fucking async

wide ruin
#

ok

#

so whats wrong with the mention?

knotty steeple
#

oml

#

scroll up

#

literally read your own message

wide ruin
#

ok i didnt know if it was right

#

still get this

knotty steeple
#

codeblock

#

dont post error stacks that big

wide ruin
#

ok

west raptor
#

mentions returns users and channels iirc

sick cloud
#

and members

late hill
#

and roles?

ruby dust
#

I don't want to talk for discord.js, but in discord.py message.mentions returns a list of member objects that were mentioned, nothing else

#

It may be the same

knotty steeple
#

how do you resize an image with css

mossy vine
#

@knotty steeple width=200px / 50% height=200px / 50%

knotty steeple
#

ok thanks

#

but thats an attribute for html mmLol

#

a

#

need to move it down now

#

nvm

earnest phoenix
#

(node:980) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit Getting this error even though I have no limit

keen drift
#

You can ignore it

earnest phoenix
#

Ahh okay

knotty steeple
#

dont ignore it

#

how about

#

not using all that error events

keen drift
#

?

earnest phoenix
#

๐Ÿคฆ

keen drift
#

It's a warning

#

I also asked the djs devs, they say it's also safe to ignore

knotty steeple
#

ok

earnest phoenix
#

Well it was the first time seeing it, bot commands still work

knotty steeple
#
        <ul>
            <li><center><a class="fab fa-discord" href="#"></a></center></li>
            <li><center><a class="fab fa-twitter" href="#"></a></center></li>
            <li><center><a class="fab fa-youtube" href="#"></a></center></li>
        </ul>
#
.footer ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
split dune
#

list type

ruby dust
#

I don't think you'd be using lists for that, if you want them to be in one line

knotty steeple
#

@split dune ??

#

@ruby dust you can use lists

late hill
#

uhh

#

display: inline-block

#

?

#

idk im bad at css

quartz kindle
#

why use lists if you want them in line?

#

use inline-block

knotty steeple
#

<center><a class="fab fa-discord" href="#"></a> <a class="fab fa-twitter" href="#"></a> <a class="fab fa-youtube" href="#"></a></center>

#

no

quartz kindle
#

display: inline-block

knotty steeple
quartz kindle
#

text-align: center and width: 100%

#

in the parent element

knotty steeple
#

๐Ÿ‘ works

knotty steeple
inner jewel
#

meta theme-color iirc

#

<meta name="theme-color" value="#abcdef">

knotty steeple
#

oh ok

earnest phoenix
#

i think thats right

bitter sundial
knotty steeple
#

not

velvet ruin
#

Do you have lock command for my discord bot ?

knotty steeple
#

code it yourself

velvet ruin
#

what ?

#

.....

knotty steeple
#

no

#

no one has it

velvet ruin
#

thank you anyway

lusty dew
#

@knotty steeple Can't you just like turn send message permission off for that channel(s)

#

For everyone?

#

And then have like a time limit as an optional thing

knotty steeple
#
  1. dont ping me
lusty dew
#

Ok sorry

knotty steeple
#
  1. wanted to be spoonfed
lusty dew
#

I know

#

I was just asking if that's the way to go?

knotty steeple
#

yes

lusty dew
#

K

#

Thx

upper tundra
#

In my android studio project, I placed my images in a folder in the drawable folder. How do I make it show the images in an ImageSwitcher by stating the folder, instead of stating the file name for each image in an array?

ruby dust
#

with discord.py, I know there is a way to "expect" a specific type of argument passed in a command by doing arg: discord.Object, but is there a way for me to assign a discord object into a variable from within the executed command?

formal agate
#

In Disocrd.js I'm trying to have it so i have can have my commands for my command handler in different folders. I've tried jerry rigging it in many ways but idk how to get it search multiple folders for different commands. Would I use "&&" statements or something along those lines? Current code:

fs.readdir("./commands/", (err, files) => {
    if (err) return console.error(err);
    files.forEach(file => {
      if (!file.endsWith(".js")) return;
      delete require.cache[require.resolve(`./commands/${file}`)];
      let props = require(`./commands/${file}`);
      let commandName = file.split(".")[0];
      console.log(`Loaded command: \"${commandName}\"`);
      client.commands.set(commandName, props);
    });
  });```
quartz kindle
#

you can put it into a function and use recursion

#

something like if folder { run function again(new folder) }

formal agate
#

maybe

quartz kindle
#

other than that, you can scan for folders first and then for each folder scan for files

formal agate
#

hmm

#

you are right

#

i tried something similar i believe but i probably did it wrong

formal agate
#

I've tried a range of things, it doesn't load any command found in another folder. I think I'm just starting to overthink this.
Code: ```js
fs.readdir("./commands/", (err, folders) => {
//console.log(folder);
if (err) return console.error(err);
folders.forEach(file => {

  fs.readdir(`./commands/${folders}`, (err, files => {
    if (!file.endsWith(".js")) return;
    delete require.cache[require.resolve(`./commands/${file}`)];
    let props = require(`./commands/${file}`);
    let commandName = file.split(".")[0];
    console.log(`Loaded command: \"${commandName}\"`);
    client.commands.set(commandName, props);
  }));
});

});```

dusk raft
#
client.on('messageReactionAdd', (reaction, user, message, guild) => {
const key = `${message.guild.id}-${reaction.message.author.id}`;
``` so uh shouldn't this work or am i retarded
formal agate
#

to do what?

#

pull reaction data?

dusk raft
#

to def key

#

yeah

formal agate
#

um

#

idk

#

i have never touched emojis

west raptor
#

it doesnt take in message

#

or guild

formal agate
#

big off

dusk raft
#

hmm

#

oh wait

#

im dummy

#

why am i checking the guild id for a reaction

#

it should be the message

#

you lied

#

i just forgot

#

to include

#

a snippet of code

west raptor
#

how did i lie?

dusk raft
#

because the action does check for the message- im using it rn to check message.author.id

west raptor
#

ffs

#

messageReactionAdd

#

does not take in message and guild

dusk raft
#

i mean you can check reddicord

#

it uses the messageReactionAdd event

west raptor
dusk raft
#
client.on('messageReactionAdd', (reaction, user, message) => {
  if(reaction.emoji.name === "๐Ÿ”ผ") {
    if (user.id === reaction.message.author.id) {
      const key = `${reaction.message.author.id}`;
        client.karma.ensure(key, {
        user: reaction.message.author.id,
        karma: 0
      });```
#

tbh im probably just retarded

#

but that works so im confused

#

oh wait

#

im still retarded

bright spear
#

MessageReaction has the message in it iirc

earnest phoenix
#

Does anyone have a pre-made discord bot that thanks users for voting
they would be willing to send me.

bright spear
#

no

#

that would break the rules

earnest phoenix
#

oh

#

How?

bright spear
earnest phoenix
#

what does

#

[tls @ 000001caca12e080] Error in the pull function.
[matroska,webm @ 000001caca12af80] Read error
[tls @ 000001caca12e080] The specified session has been invalidated for some reason.
Last message repeated 1 times

#

mean

#

its python and it stops when i use the music

sick cloud
#

@earnest phoenix there is one

earnest phoenix
#

its using ytdl

sick cloud
earnest phoenix
#

Could you link me?

sick cloud
#

idk how well it works

#

but it exists

earnest phoenix
#

Is it open source?

sick cloud
#

doesn't look like it?

bright spear
#

is it too hard to read the docs and do it yourself instead of asking people to spoonfeed you and break the rules

earnest phoenix
#

I don't want to get spoonfed

#

I was just seeing if theres already something out there that exists

#

and I don't have to waste my time

sick cloud
#

waste time
yes waste ur time on your bot

#

101 Reasons Why Discord Bots Fail: Chapter 1 ๐Ÿ‘
See above for purchase.

earnest phoenix
#

........

#

My bot isn't open source

#

I didn't copy anything for @lucid trench

bright spear
#

the docs have examples

vernal rivet
#

@earnest phoenix what they mean to say is if you don't understand the docs, or don't want to use the docs, then your probably going to have an unsuccessful bot. Best thing I can tell nicely as possible is please go learn some Js on a online course, best one is codecmady.

brittle shore
#

Can I know what command made my bot declined

vernal rivet
#

? Explain more

knotty steeple
#

i need callbacks in coffeescript GWvictoriaNotLikeBlob

bright spear
brittle shore
#

Well I added my bot for approval and it got declined saying there is a NSFW command when there is not one.

vernal rivet
#

?

#

Was your bot just been decline?

brittle shore
#

Thats what I dont understand It dont have one

sick cloud
#

@brittle shore whats ur bots name

brittle shore
#

MatrixAlpha

sick cloud
vernal rivet
#

Ok

sick cloud
#

first case there

bright spear
#

it says right there lmao

sick cloud
#

lul

bright spear
#

can u not read

vernal rivet
#

He said he doesn't have a NSFW command on the bot

sick cloud
#

-wiki

#

its obviously

#

right

#

there

brittle shore
#

By discord terms Wiki is not considered NSFW

vernal rivet
#

What does wiki do?

brittle shore
#

Read TOS

#

Its basically a big book of reading Korean

#

on anything

bright spear
#

theres probably a way to get nsfw stuff

#

ask xignotic for more info

vernal rivet
#

I think it might to say that you need to find a way to stop people from using it for NSFW stuff

brittle shore
#

How about I just deactivate the learning???

vernal rivet
#

Maybe, but if it's approved, then you will need to find a way to stop people from using wiki for NSFW stuff

brittle shore
#

No one who uses my bot uses it for NSFW reasons because my bot does log everthing being done and any NSFW users get blacklisted

vernal rivet
#

Well I guess xignotic found a way to bypass it

west raptor
#

wait what

#

you blacklist users that use NSFW commands?

brittle shore
#

I dont the bot does automatically and Korean it says he is in the DB

vernal rivet
#

Well I would check to make sure it doesn't do it if some does do it for NSFWif I were you. What you can do is if the word is a NSFW word, then return a message saying that they can not search that in the current channel and has to be a NSFW channel

brittle shore
#

Better yet I have an idea one sec

vernal rivet
#

Ok

brittle shore
#

Ok I changed the permissions to only BOT owner

#

Can my bot be reevaluated?

slim heart
#

@brittle shore you have to resubmit it

brittle shore
#

Ok.

#

Thanks JPBberry

wanton shuttle
#

Hey

slim heart
#

Hey

knotty steeple
#

TypeError: Cannot read property 'run' of undefined GWqlabsThonkery

#
        cmd = coffee.commands.get coms || coffee.commands.get(coffee.aliases.get coms)
        cmd.run [coffee, msg, args]
#
Map {
  [ 'ping',
  { run: [Function],
    settings: [Object],
    info: [Object],
    file: 'ping.coffee' } ] => undefined }
slim heart
#

@knotty steeple
what does this mean coffee.commands.get coms || coffee.commands.get(coffee.aliases.get coms)?

knotty steeple
#

google coffeescript syntax

slim heart
#

oh ight

brittle nova
#

looks very weird

slim heart
#

Erm, well, try doing console.log(coffee.commands.get coms)

knotty steeple
#

undefined

vernal rivet
#

quick question i am making a command that lets the user to listen to any radio station thats from the iheartradio, which i am using the iheartradio package, and right now its saying media must be provided. my question is media going to equal the stream link or is it something else?

last ferry
#

im about to kms over xpaths

#

i have an xpath taht works in a browser but not in my code

#

i removed all the tbodies and everything

#

and it still returns null

vernal rivet
#

nevermind i fixed it

queen fog
#

Somebody help me! Just when I add the prefix and token, it gives Traceback Error! Here is the file:

prime cliff
#

Do you have the opus.dll or opus.so along side the bot files?

queen fog
#

Yes

#

I even have youtube_dl installed

#

Waiting....

earnest phoenix
#

I'll send you an invite in DMs @queen fog

queen fog
#

Ok

stone hatch
#

Is there anything wrong here guys?

#

I just can't seem to find it.

#

It has an error.

bright spear
#

@stone hatch you don't have discord.js installed

stone hatch
#

Eh

#

Alright.

knotty steeple
#

do arrays have a random function

#

i saw someone using it idk

shadow barn
#
var Random = YourArray[Math.floor(Math.random()*YourArray.length)];
#

or you can do this too for easier random array access

Array.prototype.random = function() {
  return this[Math.floor(Math.random() * this.length)];
};

And then

const name = yourarray.random();
#

@knotty steeple

stone hatch
#

Can someone help?

#

It does not seem to work.

#

I can't find errors.

ruby dust
#

cannot read property 'first' of undefined

#

the only first I see is in message.mentions.user.first()

#

which is where it errors I guess

west raptor
#

mentions doesnt have the user property

#

only users

stone hatch
#

Alright.

#

But how do I fix it?

#

Wait.

#

Nvm.

#

Thx. @west raptor

#

Wait.

#

It still won't work.

#

Someone help me please.

knotty steeple
#

It still won't work.

#

how do we know what the problem is

west raptor
#

@knotty steeple did you ever fix the coffeescript problem you had last night

knotty steeple
#

no

west raptor
#

oof

knotty steeple
#

i rewrote the bot in js

#

because fuck that

west raptor
#

lol

stone hatch
#

This code works fine but whenever I do a report, it still sends the report but says the report channel is not found.

knotty steeple
#

that method of is depreciated

#

use a function

west raptor
#

^

shadow barn
#

did my random array work for you?

knotty steeple
#

also make the channel customizable

shadow barn
#

samurai

knotty steeple
#

ye

shadow barn
#

Ah nice

knotty steeple
#

how do you make a property with classes

#

and how do you add a function to that property

fading turret
#

which is better js or python

knotty steeple
#

ur preference

west raptor
#

comes down to personal preference

#

I like js

knotty steeple
#

i find python a bit weird

#

but its not as weird as coffeescript mmLol

west raptor
#

Ken is converting his bot to coffeescript iirc

knotty steeple
#

well

#

good luck with that

topaz fjord
#

golang is better

fading turret
#

does anyone know how to make a level leaderboard on python

topaz fjord
earnest phoenix
#
const ytdl = require("ytdl-core");
const opusscript = require("opusscript");

module.exports.run = async (client, message, args, ops) => {

if(!message.content.startsWith("/")) return;
    if (!message.member.voiceChannel) return message.channel.send(`**Please connect to a voice channel!**`);
    if (message.guild.me.voiceChannel) return message.channel.send(`**I am currently playing something!**`);
    let connection = await message.member.voiceChannel.join();
    const dispatcher = connection.playStream(`https://www.youtube.com/watch?v=29UH3Yovrn0`);
}```
#

Do any of you know why this isnt working?
Im trying to make it play a sound effect.
I get no errors?

earnest phoenix
idle mountain
#

@earnest phoenix ?

ruby dust
#

just a typical whitename asking to approve his bot

idle mountain
#

or maybe they're advertising thinkEyes

slim heart
#

@earnest phoenix I donโ€™t think you can play a direct YouTube like iirc

#

I think you have to download it first then play the file

earnest phoenix
#

No, I fixed t.

#

It works.

whole harness
#

Is there a ratelimit on postStats?

bitter sundial
#

yes

dreamy breach
#

Is it possible to get user bot count with php?

whole harness
#

@bitter sundial Whats it? I wanted to update it on every join and leave

bitter sundial
earnest phoenix
#

Hello, Could somebody tell me how I would set up a web hook that posts an embed to a channel every time someone upvotes my bot?

whole harness
#

Thx

earnest phoenix
#

Anyone?

whole harness
#

Which language?

mossy vine
#

okay so im planning to build a website that stays on the same page but changes the content often. is there any framework that can make my job easier?

#

(by often i mean literally every second)

bitter sundial
#

javascript

mossy vine
#

i said framework ๐Ÿ˜ฉ

inner jewel
#

setInterval()

mossy vine
#

something that easily lets me switch between html files without actually switching between html files

#

or something like that

#

display entirely different content while being on the same url

inner jewel
#

so you want to make a SPA

mossy vine
#

a what

inner jewel
#

single page application

mossy vine
#

basically yes

inner jewel
#

i like react for SPAs

mossy vine
#

are there any other options?

knotty steeple
#

spa

#

sounds complicated

deep pond
#

hi i need help with reddit apis

shadow barn
#

what do you need?

deep pond
#

I want to get images from r/dankmemes

shadow barn
#

which library are you using?

deep pond
shadow barn
#

eh then i can't help

mossy vine
#

whats better and why, typescript or coffeescript?

knotty steeple
#

coffeescript gets stupidly complicated in certain things

#

like callbacks

#

typescript is meh

#

coffeescript is good its just dumb at times

west raptor
#

typescript is cool and good if you are used to typings

#

I use TS for most js projects now

keen drift
#

ts seems to be the most popular

knotty steeple
#

why does it say [Message ID]

#

ID being the message id

keen drift
#

is it not suppose to

knotty steeple
#

no

fading turret
#

can someone help

obtuse wind
#

Hey can I get help, I've been trying to reprogram my bot, and I need help with my unban command, I wanna be able to use Username#Tag and userID at the same time

inner jewel
#

a banned user won't ever be a member

obtuse wind
#

oof

#

thanks

fading turret
#

what does FORBIDDEN (status code:403) : Missing Permissions mean

inner jewel
#

you don't have permission to do something

obtuse wind
#

for me it says something different

#

when my bot isn't allowed to do somethin, it pastes on the console Not authorized to do that action

fading turret
#

but i happens when i run the command on this server

obtuse wind
#

anyway would my unban command work with somethinf like this let bUser = message.guild.fetchBans(args[0])

#

^^ That's because all the bots on this server don't have administrator or the given permissions that you added by the calculator

inner jewel
#

^

obtuse wind
#

(except some bots that are in exception)

inner jewel
#

and you shouldn't ever assume you have those either

#

no

#

no bots have special permissions here

#

those in the invite

obtuse wind
#

1 bot does

west raptor
#

fetchBans doesnt take in an id

inner jewel
#

nope

#

there are no bot invite roles here

#

only regular roles

obtuse wind
#

I thought Luca Bot was the 1 exception guess not

inner jewel
#

nah

#

just regular roles

fading turret
#

lol

#

but when i do /support on testing it says that

obtuse wind
#

oki if u say so

inner jewel
#

do you try deleting the command message?

obtuse wind
#

Check if ur bot is muted aswell

fading turret
#

no

#

and no

#

it just sends a message

obtuse wind
#

show us the code

#

of the command ur trying to run

inner jewel
#

try stepping through the code with a debugger

#

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

fading turret
#

when i do /support it dosnt run

obtuse wind
#

did you see if your bot has permission to send messages

fading turret
#

how do i check

obtuse wind
#

okay first what is your bots username

fading turret
#

DailyFun

earnest phoenix
#

its muted

fading turret
#

@frosty depot

obtuse wind
#

muted

fading turret
#

why

mossy vine
earnest phoenix
#

responds to other bots

fading turret
#

wow what if i fix that

obtuse wind
#

it would wouldn't be muted

earnest phoenix
#

just fix it

fading turret
#

i did

#

i made it embed

#

it wasnt before

obtuse wind
#

you can fix that and tell a mod then they will remove the mute

earnest phoenix
#

then ask the mod who muted it to unmute it

#

no

#

the responds to bots thing

fading turret
#

so how do i fix that

#

by changing prefix or something

earnest phoenix
#

no

obtuse wind
earnest phoenix
#

if(message.author.bot) return;

obtuse wind
#

^

#

you can see that in my code

earnest phoenix
#

it's just that simple

obtuse wind
#

Line 107

fading turret
#

what language is that

earnest phoenix
#

js

obtuse wind
#

Java

fading turret
#

i do python

knotty steeple
#

its similar

#

if msg.author.bot: return

fading turret
#

like that

earnest phoenix
#

yeah

fading turret
#

so its done

earnest phoenix
#

but like is that your only command

fading turret
#

i put it on all

earnest phoenix
#

k

fading turret
#

so what do i do

knotty steeple
#

fucking why

#

just put it in the message event

#

you dont even have msg defined in your commands so that wouldnt work

fading turret
#

wow

#

help me fix it pls

obtuse wind
#

okay here

#

use this

#

if message.author.bot: return

#

Do that for all the commands

fading turret
#

i did

obtuse wind
#

now go on a different server with 1 other bot and your bot

fading turret
#

k

obtuse wind
#

use a command to make the bot try a command on your bot, and see if your bot still responds

fading turret
#

it works

obtuse wind
#

does your bot respond to the other bot

fading turret
#

so what do i do

#

no

obtuse wind
#

okay ask a moderator to unmute your bot

fading turret
#

k

knotty steeple
#

posting this again because no one helped

gilded blaze
#

That doesn't seem to be a problem? The library simply modified the toString method

tepid hedge
#

If anyone can help me with something please DM, I am having in error with index.js with

client.commands.set(commandName, props);
knotty steeple
#

if it wasnt a problem

#

i wouldnt ask

#

how to fix it

gilded blaze
#

It's not a fucken problem

knotty steeple
#

i want it to return the object

gilded blaze
#

That is the string interpretation of the object

#

If you want the object insight as a string try something like util

knotty steeple
#

yes util

#

what function

tepid hedge
#

Does anyone know what this means?

knotty steeple
#

read the error

#

commands is undefined

tepid hedge
#

ive looked everything up and double checked with other developers and thats what they have for their command handler

knotty steeple
#

did you just copy code

tepid hedge
#

no

inner jewel
#

you never set any value to client.commands then

#

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

vernal rivet
#

Command is not undefined, it's saying commandName and prop is undefined

#

@tepid hedge

bright spear
#

no..

#

its saying client.commands is undefined

vernal rivet
#

Cause of commandname and prop

bright spear
#

no

#

because client.commands is undefined

#

it has nothing to do with commandname or props

vernal rivet
#

;-; it's saying cannot read .set of undefine, wouldn't that mean it's what's in the .set, not where it is located?

hushed berry
#

What is the object that would theoretically have the set property?

bright spear
#

client.commands.set
its property set of commands.undefined

#

u dont know js~~ errors~~

hushed berry
#

lol

vernal rivet
#

Now you put it that way, but wouldn't the error be the props was not used

bright spear
#

wut

vernal rivet
#

I had the error before, and it was because the file didn't have the module.exports.help={ name: "name" };

knotty steeple
#

what

earnest phoenix
#

advaith

#

you can add the bot on your main

bright spear
#

k

zealous veldt
#

tfw 90% of the time you create a new file you name it .ks instead of .js

bright spear
sick cloud
#

what code even is that

#

.slice(22)

knotty steeple
#

well you completely ignored what i said yesterday

sick cloud
#

oh wait ic

#

nice tutorial code @stone hatch ๐Ÿ‘

knotty steeple
#

so im not helping you

sick cloud
#

go ask the guy that made the tutorial

stone hatch
#

I tried following it. ๐Ÿ˜ฆ

sick cloud
#

make ur own code

stone hatch
#

I'm trying to learn.

bright spear
#

You don't learn by copying others code

knotty steeple
#

^

last ferry
#

^

stone hatch
#

I just started with it.

#

To see how things work.

knotty steeple
#

thats the whole fucking command

last ferry
#

yeah so read an api doc and figure it out yourself instead of just ctrl c ctrl v

bright spear
#

Well obviously things don't work

stone hatch
#

Fine, you guys win, you guys know how to code, I can't.

bright spear
#

Well we learned

last ferry
#

yeah so read an api doc and figure it out yourself instead of just ctrl c ctrl v

bright spear
#

And not by copying commands

knotty steeple
#

i self taught

stone hatch
#

If you don't like the way I do it, well, don't.

#

I have my ways, you have yours.

sick cloud
#

then we won't help you

knotty steeple
#

^

stone hatch
#

Don't.

bright spear
#

And if you do copy code, don't expect someone else to fix it for you

knotty steeple
#

so why did you ask for help?

sick cloud
#

if your way is to steam peoples code then we'll be happy to ignore your help request :)

bright spear
#

You might learn something if u look at docs and fix it by urself

knotty steeple
#

i literally told you yesterday

#

the way ur using the find function

last ferry
#

yeah delete ur messages

knotty steeple
#

is depreciated

last ferry
bright spear
#

LMAO they deleted it

knotty steeple
#

haha yes

sick cloud
#

someone snipe

last ferry
#

haha yes

sick cloud
deep pond
#

LeMoNs

earnest phoenix
#

How to make your bot online?

coral trellis
#

You code it and run it

queen sentinel
#

this is extraordinary

limber swan
idle mountain
#

@earnest phoenix what is that emote lmao

#

the reaction

earnest phoenix
idle mountain
#

i need to see the bigger version

#

LMAO

#

thanks

earnest phoenix
#

np

earnest phoenix
keen drift
#

disgusting

earnest phoenix
#

Anyone know how I can make it so you dont have to run commands like @lucid trenchhelp

#

but like @lucid trench help

#

so there's a space in between

keen drift
#

just add a space to mentionprefix

static lynx
#

try specifying the lib

#

yes

earnest phoenix
#

like

#

between mention prefix and the + sign?

keen drift
#

mentionprefix, whatever the content is

static lynx
#

let mentionprefix = '@HENTAIBOT42 '

keen drift
#

add a space to that var

earnest phoenix
#
 if(command === `${prefix}synced` || command === mentionprefix  + "synced") {
static lynx
#

what is mentionprefix

#

py

#

why py this isnโ€™t py

earnest phoenix
#

i didn't mean py

#

lol

static lynx
#

ooof

earnest phoenix
#

meantion prefix

#

is meantioning the bot

inner jewel
#

why did you add a space between mentionprefix and +

earnest phoenix
#

idfk

inner jewel
#

that's literally meaningless

keen drift
static lynx
earnest phoenix
#
const mentionprefix = message.guild.member(botID).toString() ```
static lynx
#

no, look

keen drift
#

const mentionprefix = message.guild.member(botID).toString() + ' ' boom genius mode froggyjerry

static lynx
#
let mentionprefix = message.guild.member(botID).toString() + ' '```
#

oh

#

ok

#

fast

earnest phoenix
#

lmao

#

still doesn't repsond

keen drift
#

classic

earnest phoenix
#

or maybe cause I used let instead of const

keen drift
#

shouldn't matter

static lynx
#

wait

earnest phoenix
#

yeah ok it still doesnt repsond

static lynx
#

wouldnโ€™t message.guild.member(botID).toString() just show the name of the bot

keen drift
#

nah

earnest phoenix
#

no

keen drift
#

.toString func converts to mentionable

static lynx
#

ohh

keen drift
#

can you console.log mentionPrefix

static lynx
#

I havenโ€™t made anything with d.js so eeee

earnest phoenix
#

remember im not the actual developer

#

he is asleep

keen drift
#

so

#

why are u working on tis

earnest phoenix
#

Im a noob lol

#

because I wanted a bot that could do this

static lynx
#

why donโ€™t you just do something like let mentionprefix = '<@bot-id> '

#

would be easier

earnest phoenix
#

idk

#

that actually broke the mention prefix

#

it didnt work with or without a space

static lynx
#

try what I sent

earnest phoenix
#

i did

#

same thing

static lynx
#

hmm

earnest phoenix
#

anyways yall im going to head off to bed

#

gn guys

static lynx
#

night

earnest phoenix
#
  let embed = new Discord.RichEmbed()
    .setTitle('Message Deleted')
    .setDescription(`${message.user.username} deleted \`${message.content}\``)


  bot.channels.get(bot.db.get(`${message.guild.id}gs`, 'logsch')).send(embed)
});``` anyone know why that wont work and returns as field is empty
bright spear
#

can you paste the error?

zenith oriole
#

why do some bots have a null server owner property, but some have an actual owner (#commands)

blazing star
#

because some are broken

fallen oak
#

Is giving a role to everyone in a ~500 people server API spam?

misty rune
#

Certainly

sick cloud
#

@zenith oriole caching

late hill
#

@earnest phoenix You should be aware that if your bot has a nickname it won't look like <@yourBotID> but like !@yourBotID

#

Don't think that's your issue right now tho

#

Try to check if your code doesn't have a return somewhere if it doesn't start with the normal prefix.

shadow barn
#
const currentvol = voiceConnection.player.dispatcher.volume;
if(!vol) {
    return message.channel.send(`Current Volume: ${currentvol}`);
}

But now it returns values like
1, 2 & 0
How do i make the volume show like the volume that you set it as? For example
100, 200, 123
http://etcroot.pw/w22X8q

#

Trying to figure out how to get the current volume correctly

#

Anyone has an idea?

languid dragon
#
  • 100
#

basic math

#

convert it to a percentage rather than a decimal

shadow barn
#

Ah got it

#

Did this now

#
const currentvol = dispatcher.volume * 100;
if(!vol) {
    return message.channel.send(`Current Volume: ${currentvol}%`);
}
languid dragon
#

0.52 multiplied by 100 converts it to a percentage of 52%

of course if you have values like 0.523 you will get 52.3% and you will need to Math.floor() it

shadow barn
#

Worked

languid dragon
#

ja

#

so it should

shadow barn
#

Thank you ^^

languid dragon
#

]]play meme

covert turtleBOT
#

tickNo Cancelled.

languid dragon
#

]]vol 1000

covert turtleBOT
#

:volume: Volume is now at 1000%

trim saddle
#

@languid dragon can you nut

languid dragon
trim saddle
#

nou

queen fog
#

So, how do I set up a music bot in JavaScript?

#

I am just a learner

jagged birch
#

Youtube

languid dragon
#

@ionic wind how about you ask in just 1 channel instead of all 3

#

or how about you look on Google and actually try and look

ionic wind
#

I'm searching someone who wants to buy a VPS

languid dragon
#

then say that

#

"search a very good VPS"

ionic wind
#

I said that

#

lol

languid dragon
#

you said Search

#

search is NOT buy

#

also that's not permitted and is classified as advertising

shrewd sandal
#

How to remove all bans on the server with one command?

earnest phoenix
#

You can collect them into an array then use a for each.

#

@shrewd sandal

fading turret
#

can someone help me

#

with python bot

earnest phoenix
#

no

#

not unless you tell us the issue

fading turret
#

if the author is a bot it does nothing

west raptor
#

what

#

dont you want that though?

#

you dont want bots responding to your bot..

fading turret
#

yeah

west raptor
#

so wait

earnest phoenix
#

yeah wut

west raptor
#

u want bots to respond?

fading turret
#

no

west raptor
#

ok

earnest phoenix
#

@fading turret learn how to program, this can be solved with a simple Google search.

fading turret
#

i tried

earnest phoenix
#

ANY tutorial shows you how.

fading turret
#

the code broke and my old code dosnt work

west raptor
#
if <message>.author.bot:
    return```