#development

1 messages ยท Page 888 of 1

hasty sparrow
#

Nothing?

hasty eagle
#

Can I out from youtube or insta ?

cursive dagger
hasty eagle
#

What is git hub ?

sudden geyser
#

a site for developers

robust arrow
#

@distant warren I have one that plays a card game and DMs the players their hands, so I know what you want can be done

#

Just about what's most efficient

distant warren
#

@sinful belfry if I centralize it in one channel all of the people there will see each other

sinful belfry
#

i mean so that people DM the bot and it forwards the message to a specific channel that only you can see

#

i think the most similar bot to what you need is like a ticket bot

distant warren
#

I don't need the replies to be centralized, I am okay with having one on one conversations with each member

sinful belfry
#

ahhh ok

#

yeah this def sounds like a ticket bot

distant warren
#

basically I can do it now by just DMing the message to each one manually but I just wish to do it more efficiently with something that sends it to all of them automatically

#

honestly it's just starting multiple one on one conversations

sinful belfry
#

oh ok

distant warren
#

I am sending the same task to all of them and they can ask me questions about the task but their questions should be private

#

that's all

sinful belfry
#

it sounds easier if you make a server and just set up multiple channels where only one person and you can access each channel

#

then you could either make an announcement channel or just send the task to each channel individually

distant warren
#

if I send the task to each channel individually I might as well not create the channels and just dm the task

sinful belfry
#

yeah, you could

distant warren
#

also when you create a server aren't people able to see everyone on that server from somewhere?

sinful belfry
#

not necessarily

#

sorry idk why that guy said to move before

quartz kindle
earnest phoenix
#

case1 doesn't exist

#

anywhere in that object

quartz kindle
#

the array is the output of case1 as far as i understood

earnest phoenix
#

oh

#

makes sense yeah

limpid geode
#

So I am hosting my own Discord bots on servers on my residential internet connection...It's 400 Mbps down, 20 Mbps up. When I host my own bots, they time out constantly. I moved one to an EC2 instance and it has had no issues. My question is--is it the ISP or do I need to do some kind of port forwarding?

digital ibex
#

hi

#

does anyone know why my auto mod thing isn't deleting messages? Code: ```js
let badwords = [ 'hi', 'bye' ];
let content = message.content.split(' ');
if (badwords.some((e) => content.some((c) => c === e))) {
message.delete().catch((e) => {
console.log(e);
return;
});
}

#

no errors

modest maple
#

So I am hosting my own Discord bots on servers on my residential internet connection...It's 400 Mbps down, 20 Mbps up. When I host my own bots, they time out constantly. I moved one to an EC2 instance and it has had no issues. My question is--is it the ISP or do I need to do some kind of port forwarding?
Breh that speed is plenty for a bot lmao

#

might just be your location

limpid geode
#

I'm in a matro metroplex.

#

*major

lyric mountain
#

Also note that discord api constantly oscillates, so it might just be common disconnections

#

Because discord is, ahem, a stable platform

limpid geode
#

The EC2 instance has had none in the time period my server would have had 10.

#

But maybe the EC2 instance is nearer a Discord datacenter.

lyric mountain
#

Probably

#

Their gateway is in NY

#

Remember that when considering latency

limpid geode
#

I was also wondering if I needed to DMZ the bot server or add some kind of port forward/filter/trigger.

earnest phoenix
#

I think you have to hard code every word like:

message.channel.messages.cache.get or find(message.guild.member(message.author).lastMessageID).then(async (message) => {
await message.delete();
})
}```
#

@digital ibex

limpid geode
#

Just curious for other developers around, how many lines of code is your largest bot?

digital ibex
#

like mine is around 10k

true tundra
digital ibex
#

assuming

lyric mountain
#

Idk, never counted

digital ibex
#

@earnest phoenix i don't think u have to

limpid geode
#

Ah, then you've got my largest one beat, lol.

lyric mountain
#

But more than 500k for sure

earnest phoenix
#

@digital ibex idk... I said maybe

limpid geode
#

But mine also has zero comments and very little whitespace.

earnest phoenix
#

You definitely don't have to hard code it lol

#

just run a for loop on the array

digital ibex
#

what is the equivalent to .includes for an array? like, .includes takes a string, whats .something which takes an array?

#

ok

earnest phoenix
#

isnt the equivalent to includes for an array, includes?

digital ibex
#

no

earnest phoenix
#

cant you do array.includes(thing)

digital ibex
#

.includes takes an array

#

tho

lyric mountain
#

If you make an array of arrays, includes will take an array

#

But I guess this ain't the case

#

Just make an iterator to compare the two arrays

digital ibex
#
let oof = ['hi', 'bye'];
for ( const ofs of oofs) {
/* what do i put here */
}
lyric mountain
#

Turn it into a function and use in your code instead of writing it every time

digital ibex
#

idk

earnest phoenix
#

here's a tip

#

don't bother with word filters

digital ibex
#

but .includes(string)

lyric mountain
#

Yeah, you block bye, then someone comes with by3

digital ibex
#

.includes(array) ?

lyric mountain
#

Then by-e

earnest phoenix
#

tbf you can have a word filter but at least make it user customizable

#

there are ~1111998^1990 ways to bypass your filter

digital ibex
#

uhhhh

lyric mountain
#

Link filters are doable, but word filters are a no-no

earnest phoenix
#

just include every known character in the filter, can't bypass it then WeSmart

lyric mountain
#

Not even big companies can do it

earnest phoenix
#

the unicode spectrum is huge

#

you can't make a filter on a service which literally allows you to send 120k+ different characters

digital ibex
#

confuso

#

how can i just uh

#

make a simple automod thing

lyric mountain
#

Tl;dr

#

If you make a word filter, someone WILL bypass it

sudden geyser
#

What's the maximum length of a guild role's name?

lyric mountain
#

@sudden geyser try to create a role in you server with as many chars as you can write, then count it

digital ibex
#

if its not a word filter then?

lyric mountain
#

Depend on the filter

#

Most are bypassable

sudden geyser
#

thanks, it was 100.

#

I tried in the roles menu and it just reset the name

digital ibex
#

i just want one not too easy and not too hard

#

like

lyric mountain
#

Few ones that kinda work are url filters and texts with patterns

digital ibex
#

ok, for now i#, just going to create a simple word filter

#

and create an option to add more stuff

earnest phoenix
#

I could see a word filter working a bit better if the program was restricted to a certain set of characters

#

but something like Discord allows practically every known character

digital ibex
#

idrc about the filter tbh, i'm going to add an option to add mroe stuff anyways

limpid geode
#

I think I fixed it...maybe. Putting the bot host in the DMZ has stopped the timeout issues, or at least they are less frequent.

digital ibex
#

but how can i just like, delete the messages?

#

ik, its Message.delete();

earnest phoenix
#

i can create a file .html with a bot of discord?

#

what

limpid geode
#

Depends on the operating system and language.

wheat jolt
#

How can redis help a discord.js bot?
I mean, for example Dyno uses mongodb and redis as databases. Why it isn't using only monogo, but redis too

limpid geode
#

If you're using Discord Bot Maker, very difficult.

#

If you're hosting your own like me, easy.

lyric mountain
#

How can redis help a discord.js bot?
I mean, for example Dyno uses mongodb and redis as databases. Why it isn't using only monogo, but redis too
@wheat jolt probably because one is a main db while the other is a cache db

wheat jolt
#

ah

#

thanks

fresh kernel
#

I have a very strange issue. I am using the following bit of code to wait for a reaction, and it works fine. But the moment someone else also runs this command, which generates a seperate message with a reaction, makes it so that when the first user hasn't responded yet, the bot will not respond to their reaction anymore, but will respond to the second user's reaction.

However, I do still see a log in the console that the timer ended, from both messages. The first user's log shows that the bot collected 0 reactions, even if the reaction was clicked.

earnest phoenix
#

?docs vote

lyric mountain
quartz kindle
#

@fresh kernel how do you define dodoembed?

fresh kernel
quartz kindle
#

try changing all your var to let

fresh kernel
#

It didn't change the behavior

quartz kindle
#

gonna need to see more code then

#

another suggestion is to use message.awaitReactions() instead of createReactionCollector

fresh kernel
#

Oof. Do you mind if I send it in private? The entire file is 300 lines until that part

#

I haven't tried that

#

I'll get back to you in a moment then

quartz kindle
#

i g2g but try that

wraith haven
#

someone can help me plz

sudden geyser
#

in line 23, you're trying to use the lock variable even though you're outside the run export.

wraith haven
sudden geyser
#

well the error says it's on line 8

#

the channel property is not present.

#

are you sure the arguments you passed to the run command are correct

#

as in exports.run = async (...) => {...}

wraith haven
#

yes

restive furnace
#

await

#

remember that, when u dont use promises

scenic kelp
#

You're running it with (client, message, args) but it's expecting (message, prefix, client)

wraith haven
#

so what should i change ?

sudden geyser
#

you change variable names to make sense

scenic kelp
#

Don't just copy paste code without understanding what it does

earnest phoenix
#

help bot dont working

sonic lodge
#

botconfig-token isn't a valid token

torn nebula
#

remove strings ""

earnest phoenix
#

witch?

sonic lodge
#

yes remove the strings

torn nebula
sonic lodge
#

bot.login(botconfig.token);

earnest phoenix
sonic lodge
#

๐Ÿ‘Œ

earnest phoenix
#

i try

sonic lodge
#

now you are referencing the token you pasted in the json file

earnest phoenix
#

nothing...

sonic lodge
#

hm

sudden geyser
#

why are you in the node modules folder

sonic lodge
#

^

iron steeple
#

Go to the main folder yes

earnest phoenix
iron steeple
#

The bot folder

earnest phoenix
sonic lodge
#

or cd .. in your terminal

iron steeple
#

You have to open the console in the bot folder

sudden geyser
#

is that token even right

earnest phoenix
sudden geyser
#

that doesn't look like a bot token

sonic lodge
#

you went too far lol

iron steeple
#

Looks right to me

#

@earnest phoenix cd bot

sonic lodge
#

then node index.js

earnest phoenix
iron steeple
#

Yes

earnest phoenix
#

this module error

torn nebula
#

yes because index.js is in node_modules folder

sudden geyser
#

why

earnest phoenix
sonic lodge
#

move those last two files to bot/

earnest phoenix
#

this guy

sonic lodge
#

like, drag them to the folder named bot

earnest phoenix
#

yea

#

bot

#

name

sonic lodge
#

and then try node index.js again

sudden geyser
#

do you know how to drag a file into another folder

earnest phoenix
#

bruj

#

try

#

move index.js and botconfig.json into C:/Users/hp/Desktop/bot/ rageW

sonic lodge
#

where's index.js

earnest phoenix
#

oki

#

node modules

sonic lodge
#

and botconfig.json

earnest phoenix
#

move*

#

and botconfig.json too

#

k

sonic lodge
#

inhale deeply

earnest phoenix
sonic lodge
#

now node index.js

earnest phoenix
#

exhale

sonic lodge
#

๐Ÿ‘

earnest phoenix
#

lol

sonic lodge
#

oh lord

sudden geyser
#

you never even made a new instance of the client class

sonic lodge
#

you need to define bot

earnest phoenix
#

define

#

wjat

#

im eng trash

sonic lodge
#

const bot = new Discord.Client()

scenic kelp
#

I highly suggest you read up on JavaScript basics

earnest phoenix
#

^

sonic lodge
#

^

scenic kelp
#

before diving into making a bot

#

It will save you hours in the long run

earnest phoenix
#

My first JS project was a Discord bot

sudden geyser
#

^ to parm also I think that client token is wrong just from the prefix

earnest phoenix
#

But I had years of experience in other languages smirk

#

here?

#

bruh

#

oh deleted

#

that ain't a token

#

OPS

scenic kelp
#

That's not a bot token and you also shared the whole thing

earnest phoenix
#

rip

sonic lodge
#

don't ever do that

earnest phoenix
#

I forgot

sonic lodge
#

at least it's not a real one

earnest phoenix
#

kek

maiden mauve
#

is it worth downloading a reaction library to handle embed menus?

#

or is it not so much work to brute force the coding?

earnest phoenix
#

no

sudden geyser
#

why not just create your own?

earnest phoenix
#

what

sonic lodge
#

no no no no no

scenic kelp
#

wrong token

earnest phoenix
maiden mauve
#

Just wanted that answer before I dove into learning it

earnest phoenix
#

that doesn't even say token anywhere

maiden mauve
#

thanks ๐Ÿ˜„

scenic kelp
#

That's entirely the wrong thing

sudden geyser
#
  1. Don't show your token.
  2. That's your client token, not your bot token.
  3. You should read up on documentation.
earnest phoenix
#

i forgot

#

sorry

#

I don't think that's something you "forget" tbh

torn nebula
earnest phoenix
#

This man has it

#

i didn't show all this token

sonic lodge
#

as mentioned before you should learn the basics of javascript first

earnest phoenix
#

maybe programming in general

#

@sonic lodge

#

you can't pull things out of thin air

#

Can you help me at dm

#

pLs

#

im new to js

sonic lodge
#

do you want me to like

#

teach you javascript

earnest phoenix
#

would

sudden geyser
earnest phoenix
#

I was making infrastructure

#

kek

#

I want to learn exactly now

sonic lodge
#

what kind of infrastructure

earnest phoenix
#

inb4 big

#

free codes edit

sonic lodge
#

lol

earnest phoenix
#

oopled

sonic lodge
#

what?

earnest phoenix
#

can you help me ?

#

let's not busy here

#

I'm not him but this is a great place to get help rather than dm mmLol

#

oh

#

sure

sonic lodge
#

yes, and also i really don't have the time

earnest phoenix
#

what should I do

sonic lodge
#

there have been various sources sent above that will probably help you

earnest phoenix
#

ok

#

ie

sonic lodge
#

come back here when you're finished

earnest phoenix
#

i came

#

lol

#

lol

sonic lodge
#

did you complete the entire 30 hour course

#

in 3 minutes

earnest phoenix
#

absolute speed

#

lol

sonic lodge
#

show me ur powers, sensei

earnest phoenix
#

available meaning

nocturne dagger
#

okay so i big dumb

#

how do i get the user that joined to tag them with a GuildMemberAdd

#

discord.js

#
client.on("guildMemberAdd" ,(message, member) => {
welcomechannel.send(I WANT TO TAG THE USER HERE)
welcomechannel.send(embed)
}
earnest phoenix
#

@nocturne dagger

nocturne dagger
#

yes?

earnest phoenix
#

member.author

summer torrent
#

message ?

nocturne dagger
#

welchannel.send(member.author)
^
TypeError: Cannot read property 'author' of undefined

#

does not work

summer torrent
#

member.author?

#

member.author is wrong

#

that is member.user.tag

nocturne dagger
#

welchannel.send(member.user.tag)
^
TypeError: Cannot read property 'user' of undefined

summer torrent
#

also guildMemberAdd event has 1 parameter

nocturne dagger
#

kk

earnest phoenix
#

How do I make a voting command? Would i redirect to the vote page on top.gg or is there a function?

sudden geyser
#

you redirect them to the vote page

earnest phoenix
#

okie thanks

#

how i get this?

summer torrent
#

disk usage?

earnest phoenix
#

yes

summer torrent
#

which language do you use

knotty steeple
#

take a look at the os module

#

tho ur gonna have to do some math on it

summer torrent
knotty steeple
#

no

#

u dont need an extra module

#

os is node.js

pale vessel
#

get os-utils to save yourself the trouble

earnest phoenix
#

@summer torrent js

#
UnhandledPromiseRejectionWarning: TypeError: moment.duration(...).format is not a function
#
  let actividad = moment.duration(client.uptime).format(" D [dias], H [hrs], m [mins], s [secs]");
pale vessel
#

npm install moment-duration-format

earnest phoenix
#

i do that

#

and say ```js
UnhandledPromiseRejectionWarning: TypeError: moment.duration(...).format is not a function

fallow quiver
#

This is actually CSS, I'm working on my bot's dashboard, is there a way to use a selector like :hover for a specific element? Not by class or id but rather like:

<div class="parent">
  <div class="child":hover { color: red; }>Text</div>
<div>
#

That way only this child class would have the transition

nimble escarp
#

@fallow quiver The only way I can think of that would be through javascript and onmouseover

fallow quiver
#

So something like:

<div class="parent">
  <div class="child" onmouseover="(this).style.color = 'red'" { color: red; }>Text</div>
<div>

Just without the pseudo code

summer torrent
#

@earnest phoenix define moment-duration-format in your code

earnest phoenix
#

how?

#

i try

#

but i cant

summer torrent
#

just require("moment-duration-format")

earnest phoenix
#

const moment = ^^

#

?

summer torrent
#

no

#

just js require("moment-duration-format")

earnest phoenix
#

ok

nimble escarp
#

@fallow quiver Well to achieve what you want I'd probably use mouseenter and mouseleave.

fallow quiver
#

Ah

#

Ok

#

Thanks

earnest phoenix
nimble escarp
#

but there is no benefit to doing that in my opinion, just use CSS

#

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

earnest phoenix
#

the bot say NaN

fallow quiver
#

I suppose I could use class + id to get a similar effect

nimble escarp
#

That'd be the best approach in my opinion.
EDIT: And a classical approach pepeshrug

earnest phoenix
#

@summer torrent the bot say NaN

summer torrent
#

what

earnest phoenix
#

Hi can anyone tell me how to set my bot to streaming tried everything nut nothing seems to work

nimble escarp
#

What library are you using? @earnest phoenix

earnest phoenix
#

discord.js

#

sorry im new

summer torrent
#

just put twitch link

#

@earnest phoenix can you show your code

nimble escarp
#
bot.user.setPresence({
        game: {
            name: 'with my friends',
            type: "STREAMING",
            url: "streaming url (twitch)"
        }
    });
earnest phoenix
#

client.on('ready', () => { console.log("Connected as " + client.user.tag) client.user.setActivity("+help to start", { type: "STREAMING" }) })

#

@summer torrent ok

#

is in spanish

#
if(command === "botinfo"){
  let actividad = moment.duration(client.uptime).format(" D [dias], H [hrs], m [mins], s [secs]");
  let embed = new  Discord.RichEmbed()
  .setTitle('Informaciรณn del bot')
  .setColor(0xff0000)
  .setAuthor(`Creador: ${client.users.get('507367752391196682').username}`, `${client.users.get('507367752391196682').avatarURL}`)
  .addField('CPU', `${(process.cpuUsage().system / 1024 /1024).toFixed(2)}%`, true)
  .addField("Memoria", `${(process.memoryUsage().heapUsed / 1024 /1024).toFixed(2)}%`, true)
  .addField("Discord API", `${Math.floor(message.client.ping)} ms`, true)
  .addField('Uptime', actividad, true)
  .addField('Ping', `${Math.floor(message.createdTimestamp - Date.now(), true)} ms`)
  .addField('Numero de servidores', client.guilds.size, true)
  .addField('Numero de personas', client.users.size,true)
  .setFooter(`${client.users.get('652244414412095528').username}`, client.users.get('652244414412095528').avatarURL)
  message.channel.send({ embed })
}
summer torrent
#

where is NaN

#

uptime?

earnest phoenix
#

Yes

#

anyways how do you set code like that @nimble escarp

summer torrent
nimble escarp
#

You can place it inside an event, I'd place it in the ready event personally.

earnest phoenix
#

u r 12v?

summer torrent
#

yes

earnest phoenix
#

i am 11v

#

:v

#

wdym

#

@summer torrent

summer torrent
#

๐Ÿค”

nimble escarp
#

@earnest phoenix

bot.on("ready", () => {
    // stuff inside here 
});
earnest phoenix
#

no like ik that but like the outline

nimble escarp
#

hmm?

earnest phoenix
#

where ready is green

#

i put `

#

put three ` on each side

nimble escarp
#

```js
code
```

earnest phoenix
#
        game: {
            name: 'with my friends',
            type: "STREAMING",
            url: "streaming url (twitch)"
        }
    });```
#

ok thx

nimble escarp
#

If you add the "js" part it'll highlight code.

earnest phoenix
#
        game: {
            name: 'with my friends',
            type: "STREAMING",
            url: "streaming url (twitch)"
        }
    });```
#
        game: {
            name: 'with my friends',
            type: "STREAMING",
            url: "streaming url (twitch)"
        }
    });```
scenic kelp
#

have to do it on a separate line

earnest phoenix
#

ok

#
bot.user.setPresence({
        game: {
            name: 'with my friends',
            type: "STREAMING",
            url: "streaming url (twitch)"
        }
    });```
nimble escarp
#

yup

earnest phoenix
#

ok thx guys !!!

#
bot.user.setPresence({
        game: {
            name: 'with my friends',
            type: "STREAMING",
            url: "streaming url (twitch)"
        }
    });``` didnt work
#

still says playing

restive furnace
#

because that url needs to be real twitch url GWskypeFacepalm

earnest phoenix
#
client.user.setPresence({
        game: {
            name: '+help to start',
            type: "STREAMING",
            url: "https://www.twitch.tv/beastatfnbr"
        }
    });```
#

how i change this to 11v?

moment.duration(client.uptime).format(" D [dias], H [hrs], m [mins], s [secs]");
restive furnace
#

thats alr

#

client.uptime is same on v11 n v12

#

and moment duration format has nothing to do with discord.js version

earnest phoenix
#

why say NaN?

restive furnace
#

well you do something wrong

earnest phoenix
#
client.user.setPresence({
        game: {
            name: '+help to start',
            type: "STREAMING",
            url: "https://www.twitch.tv/beastatfnbr"
        }
    });``` correct??
#

idk

restive furnace
#

NaN = Not an Number.

earnest phoenix
#

wat that\

nimble escarp
#

"You should try it and see"

fallow quiver
#

I know domains are cheap rn but I've seen an influx of domains that are just videos like that

restive furnace
#

ee = estonia country domain CD

#

XD

nimble escarp
#

I've been trying to obtain a .gov domain but no luck

fallow quiver
#

It is SFW

nimble escarp
#

uhh not really SFW pepeshrug

fallow quiver
#

I guess I meant it didn't have any dirctly explcit images

#

Well it's gone now so no worries

earnest phoenix
#

eh got it thx

elder moss
#

za warudo

nimble escarp
valid frigate
#

you can't get a .gov domain unless you're actually making a website related to the government

#

iirc

nimble escarp
#

ikr pepecry

earnest phoenix
#

How do I actually POST to webhooks.
I'm trying this

    local url = "https://discordapp.com/api/webhooks/ID/TOKEN"
    local res, body = http.request("POST", url, {content = "test"})
nimble escarp
#

is that lua?

paper cliff
#

yes it is

iron steeple
#

@earnest phoenix do you mean webhook.send?

paper cliff
#

he's doing a raw POST request to the webhook url

earnest phoenix
#

^

paper cliff
#

idk if discordia actually supports webhooks, if so, you should use that

elder moss
earnest phoenix
#

@paper cliff it doesn't, that's why I'm doing it raw lol.

paper cliff
#

yes makes sense

earnest phoenix
#

im just really stupid

#

n its not working ahah

paper cliff
#

i'm not really familiar with lua modules so i can't really help u unfortunately

elder moss
paper cliff
#

but i think, your third parameter is not correct

#

idk

#

wait no it makes sense

earnest phoenix
#

i asked in discord api discord but

#

they said

paper cliff
#

@earnest phoenix you have to pass a header "Content-Type" to "application/json"

#

i think

earnest phoenix
#

ah

paper cliff
#

and make that JSON

earnest phoenix
#

maybe

paper cliff
#

the third parameter should be a string containing JSON

#

not really sure about that but if that can helps

visual zenith
#

I think fallenthetaco is a long name, anyone know a better name for my discord bot?

elder moss
summer torrent
#

can you stop?

paper cliff
#

also, why did you ping this random guy lol

#

@earnest phoenix is it working with correct headers and a JSON body?

slender thistle
#

Move to #memes-and-media if you're not going to be posting anything relevant for this channel. @elder moss

elder moss
#

let me think

#

idrc tbh but sure

pale vessel
#

bad troll

visual zenith
#

aint good dude

summer torrent
#

"let me think"

elder moss
#

let me think

pale vessel
slender thistle
#

All of you should stop, too.

elder moss
#

Agreed, bad people right? Where the mite for them? @slender thistle

slender thistle
elder moss
#

yes sir!!!

paper cliff
visual zenith
#

I think fallenthetaco is a long name, anyone know a better name for my discord bot? sorry for the repost, just spam got in the way

paper cliff
#

is it related to development stuff?

slender thistle
#

Not really fit for this channel.

elder moss
#

agreed sir

visual zenith
#

tf?

#

also idk where to send it

slender thistle
visual zenith
#

ah-

#

alright

opaque seal
#

Hi guys, I have an issue with my dynamic embed, could you help me? Basically I want that everytime a reaction is added, it gets removed and the bot switches the embed content. But with my code it removes both my reaction and the bot reaction that was created at the beginning at the code:
https://hatebin.com/adijjqwnlt

sudden geyser
#

why are you creating six reaction collectors when you could have it all under one?

opaque seal
#

I need differenet reactions to switch different amount of pages and in different directions,

earnest phoenix
#

@paper cliff solved the problem ๐Ÿ™‚

paper cliff
#

You can do that in one reaction collector

#

Oh nice, how?

earnest phoenix
#
local headers = {
        {"content-type", "application/json"}
      }
      local payload  = {
        content = "test"
      }
      coroutine.wrap(function()

      local res, body = http.request("POST", "https://discordapp.com/api/webhooks/ID/TOKEN", headers, json.encode(payload))
      end)()
opaque seal
#

You can do that in one reaction collector
@paper cliff But then I would have to put 6 if inside that

earnest phoenix
#

Has to be sent as a string.

paper cliff
#

yea with json and headers

#

nice

opaque seal
#

But then I would have to put 6 if inside that
and it would get real messy

sudden geyser
#

@opaque seal keep an array of the emojis you're using then check if the reaction added is in that array.

#

and check the user ID of course.

opaque seal
#

@opaque seal keep an array of the emojis you're using then check if the reaction added is in that array.
@sudden geyser each reaction does a different thing, I didn't explain that prob

sudden geyser
#

the way you're doing it requires six new event emitters.

paper cliff
#

6 if conditions blocks is probably better than 6 events
and you can avoid multiple conditions blocks anyway

sudden geyser
#

yeah so in the collect event, check which reaction it is.

#

r is an instance of MessageReaction. Calling .remove on it removes all reactions from the message which are the same.

opaque seal
#

r is an instance of MessageReaction. Calling .remove on it removes all reactions from the message which are the same.
that's what confused me the most, because when I tried it the first time it only removed the reaction I added, not the bot reaction, instead once I added more events it started removing all reactions

#

6 if conditions blocks is probably better than 6 events
and you can avoid multiple conditions blocks anyway
so better if I check in the event?

#

that's what confused me the most, because when I tried it the first time it only removed the reaction I added, not the bot reaction, instead once I added more events it started removing all reactions
I still don't get why this happened

sudden geyser
#

Well, what version of Discord.js are you using?

opaque seal
#

v12

pale vessel
#

did you just migrate from v11?

opaque seal
#

no

sudden geyser
#

Okay so v12

that's what confused me the most, because when I tried it the first time it only removed the reaction I added, not the bot reaction, instead once I added more events it started removing all reactions
On v11, it's .remove for a specific user. On v12, it's .users.remove instead. You shouldn't have more than one event in the first place.

so better if I check in the event?
It's better you have one event rather than six.

opaque seal
#

ok

#

so it was just a bug?

earnest phoenix
#

How I can use megadb on py?

modest maple
#

the fuck is megadb

#

thats a Node package

pale vessel
#

maybe that's why he's asking how to run it on py

#

although i don't think that would be possible

modest maple
#

It is possible, but its not for beginners at all

#

thats where it gets very complicated

earnest phoenix
#

Hello!

#

I just had a question. Why is my ping command saying API Latency: NaNms instead of a number? Here's the code js receivedMessage.channel.send("Pinging...").then(m => { let ping = m.createdTimestamp - receivedMessage.createdTimestamp m.edit(`Pong!๐Ÿ“ __**Bot Latency:**__ ${ping}ms, __**API Latency:**__ ${Math.round(client.ping)}ms`) })

#

because client.ping on the newer versions is no longer a thing

marble juniper
#

if you use v12 you need to do client.ws.ping instead of client.ping

ember bluff
#

hello bot is not in the turkish category, what is the reason?

glad charm
fluid orbit
#

hey i'm using lavalink in my bot the bot is working fine in my pc but on the vps host it won't run somesongs the api return nothing

#

any idea?

pale vessel
#

it should log at least an error on the server

fluid orbit
#

it did

pale vessel
#

return nothing

#

pls man

little prism
#

What are pros and cons of giving a link to git repo with it's source code?

stuck ravine
#

Hello, someone knows how to write text in json with spaces?

severe verge
#

Hey, I'm the one actually making it

The Lavalink search seems to be returning a null value despite apparently getting a match in the following code:

#

It doesn't say that it got no results, but sets track to null and errors later down the line. This only occurs with some youtube videos and only on a linux vps, not on a windows machine.

fluid orbit
#

yup

prime cliff
severe verge
#

Because it does another search

prime cliff
#

Also Response.Items.Count will always be 0 if there is not match?

green vale
#

Does anyone know how to use Discord.js's Kurasuta cluster lib

severe verge
#

I would have also thought that. I believe that it's adding a null item to the list but I don't know why, and it's only on linux

maiden mauve
#

Getting a little bit lost in reactions atm

#

the reaction.message returns the object I want (the richembed)

#

but I can't seem to find a way to pull the reaction out of the collection

green vale
#

here uh

#

You're using DJS right? @maiden mauve

maiden mauve
#

yeah

green vale
#

Are you using ReactionManager?

maiden mauve
#

that's the part of the datablock I'm trying to assign to a variable

#

Nah, just winging it off client reaction event

green vale
maiden mauve
#

oh its its own object?

green vale
#

You could probably check the reactions property of the message

#

reaction.message.reactions I believe

maiden mauve
#

yeah that returns a smaller group than the full .msg

green vale
#

Hm

#

Are you using MessageReaction?

maiden mauve
green vale
#

Yup okay

#

Are you just looking for the emoji or..?

maiden mauve
#

Yeah I want to assign or compare the emoji

green vale
#

Assign the emoji to the message ok

gilded gazelle
#

how would I use applications.builds.read scope, I already did the token exchange now all I need is the URL to read user's applications. Does anyone know the URL that I'm suppose to go?

green vale
#

message.react if you wanted to add a reaction

maiden mauve
#

right, I'm already adding the reactions

green vale
#

Yeah so comparing?

maiden mauve
#

I'm trying to get the program to tell me what emoji was reacted on top of that

#

like left/right arrows

green vale
#

If that's what you're looking for at least

maiden mauve
#

oh nice

#

I guess i dug too deep in it

#

thank you

green vale
#

yw

maiden mauve
#

is it an array if there are multiple reaction emojis?

green vale
#

I think it just gets the emoji for a single reaction

maiden mauve
#

oh right

#

because its reacting

#

dur

#

reacting to reactors with a reaction

#

fun

green vale
#

yeah

#

fun

#

lol

queen needle
feral haven
queen needle
#

you need a webhook i believe

feral haven
#

and how i make it ?

modest maple
#

@feral haven you need to use the dbl api

#

go to the site and click api

#

should have all the info their for your chosen lang

#

for posting guild count

feral haven
#

ok thanks

summer torrent
pale vessel
#

This channel is an archive of old examples.

#

use docs

craggy mural
#

does anyone know what i did wrong? it says "TypeError: Cannot read property 'member' of null." the line of code in questions is const member = message.guild.member(user);

#

also i defined user

pale vessel
#

guild is null

craggy mural
#

no

#

wait

prime cliff
#

Just debug your code and use console write to see what parts are causing issues tbh

craggy mural
#

ok

prime cliff
#

Also what is "user" ?

#

It that an id or is it e member

craggy mural
#

const user = message.mentions.users.first();

prime cliff
#

Are you checking if your messages contains any mentions in the first place

craggy mural
#

yes

#

in my commands

#

actually, i'll check. it does

mint cypress
#

Hi

queen needle
quartz kindle
#

rps[i] is one of rock paper scissors

#

so this is always true

queen needle
#

oh

#

how would i change that?

quartz kindle
#

actually you dont need that block at all, you dont need a lot of stuff in you code

#

this also looks wrong

queen needle
#

it should be + 0

quartz kindle
#

Math.random() returns a value between 0 and 0.9999, so multiplied by 3, it can return between 0 and 2.9999, +1 will make is 1-3.9999, floor it will make it 1-3

#

array indexes are 0-2 not 1-3

queen needle
#

so would i change it to 2?

#

im a bit confused

quartz kindle
#

also you already floored it, no need to parseInt it

queen needle
#

oh

quartz kindle
#

and you definitely dont need parseInt("1")

#

which is literally the same as writing 1

queen needle
#

so i can just get rid of this line let comp_res = parseInt(comp) - parseInt("1");

quartz kindle
#

yes

#

and for random, you dont need to add or remove anything from it

#

just Math.random() * 3

queen needle
#

and then do i just change all the comp_res to comp

quartz kindle
#

yes

queen needle
#

now the command doesnt send a message?

quartz kindle
#

and you dont need to parseInt it again in comp_val

queen needle
#

so

#

let comp_val = rps[(comp)];

quartz kindle
#

no need for () either

queen needle
#

oh

#

if i pick rock and it gets scissors i lose

quartz kindle
#

also this part, you make it so i becomes the value that you beat, not the value that you chose, was it on purpose? nothing wrong with it, just making sure we're on the same page

#

if you chose rock, you get 2 which is the index for scissors

queen needle
#

not it wasnt

#

but if i put those up a number the command doesnt work

quartz kindle
#

its not up a number, its just the numbers are incorrect, not sure if you did it on purpose or not

queen needle
#

i didn't

#

what would the correct numbers be?

quartz kindle
#

paper is 0, rock is 1, scissors is 2

#

also, the way you coded it, you could do !rps rockscissorspaper and it would chose scissors for you

queen needle
#

wdym

#

and rock rock said lost not test

#

tie*

quartz kindle
#

how does your code look now?

queen needle
#

where would i use the !rps rockscissorspaper

grizzled raven
#

is this - js { lbdata: Object } what i put into the mongoose schema if i want to do the equivalent to this? - ```js
lbdata[userID] = [Object] // <- lb stuff

quartz kindle
#

you wouldnt, just saying if you did, thats what would happen

queen needle
#

oh

#

rock rock is lose rock paper is lose rock scissocer is tie

grizzled raven
#

is one able to do that with mongodb anyway?

quartz kindle
#

you still got it wrong lmao

queen needle
#

crap

grizzled raven
#

why does it look like you're taking the hard route?

quartz kindle
#

hes taking the super overly and needlessly complicated route lmao

#

@grizzled raven i think you need to specify the object's contents in the schema as well

queen needle
#

tbh i copied the code cause i didnt think i could code this command now i think i could without this many problems but i dont want to mess up

#

but

#

if i choose paper and it gets scissors i win

#

for some reason

unique nimbus
#

what

quartz kindle
#

@queen needle if you coded it yourself, you'll probably get a better version of it

grizzled raven
#

something simple like this would work```js
let choices = ["rock", "paper", "scissors"]
i = choices.indexOf(args[1].toLowerCase())
if (i === -1) return message.channel.send("invalid input lol")

//check who is the winner cause im lazy ๐Ÿ˜Ž

quartz kindle
#

that whole code is really shit lmao

queen needle
#

ill try my own verison

quartz kindle
#

exactly

grizzled raven
#

no but like

quartz kindle
#

or mixed type

grizzled raven
#

yeah i do that for values that are definite, but are you able to do something like this js example?

let object = {}
// some random stuff happens, a user did something and got a score of 4
object[user.id] = 4
#

or would i have to use an array for that instead?

quartz kindle
#

i guess you should use mixed

abstract crow
#

It just look so odd with the title

#

How it's so dark compared to the actual second line

quartz kindle
grizzled raven
#

thats how fields are with the new update

#

and i saw that

#

how do they work?

quartz kindle
#

idk, i dont use mongo nor mongoose

#

or you can use a map

#

then you do object.get(user.id)

queen needle
#

if i was doing like if(args[0] equals to another varible would i use == or =

summer torrent
#

what happens if I leak my vps IP LUL

quartz kindle
#

99% chance of nothing

#

@abstract crow those are field names/titles, not much you can do about it i guess

summer torrent
#

@abstract crow are u old mod ?

quartz kindle
#

if you dont like them, you can hide them, and write a bold title in the field content lol

grizzled raven
#

what do you use?

#

sql?

queen needle
#

so i figured out how to do the tie for the rps command but how would i do winning and losing

quartz kindle
#

i use sqlite

grizzled raven
#

oh ok

quartz kindle
#

@queen needle cant get easier than directly comparing them

queen needle
grizzled raven
#

i remember i made a rps game in scratch once

#

let me steal my scratch code imcool

queen needle
#

i could do it but there has to be an easier way then writing all the possible responses

grizzled raven
#

there is but its complicated and probably worse

#

like

quartz kindle
#

you can simply do like this, no need to over complicate when you dont know how to make it better ```js
if(me === comp) { tie }
else if(me === "rock" && comp === "paper") { lose }
else if(me === "rock" && comp === "scissors") { win }
else if(me === "paper" && comp === "scissors") { lose }
else if(me === "paper" && comp === "rock") { lose }
else if(me === "scissors" && comp === "paper") { win }
else if(me === "scissors" && comp === "rock") { lose }

queen needle
#

i forgot about else if

#

and im not using comp let bot = rps[Math.floor(Math.random() * rps.length)]

quartz kindle
#

this way you know exactly what your code does and you have full control and understanding of it

queen needle
#

im using bot

sacred crystal
#

OH MY GOD

#

i beg you use a switch case

quartz kindle
#

it doesnt matter

sacred crystal
#

i beg to differ

sacred crystal
#

that is disgusting

quartz kindle
#

what matters is that he can read it and understand what it does

grizzled raven
#

switch makes it thicker anyway xd

sacred crystal
#

well no

queen needle
#

i understand else if more then a switch

quartz kindle
#

once they get comfortable they can move on to other things

sacred crystal
#

i see

grizzled raven
#

but one thing you can change is that if is not a function kirbygun

#

xddd

queen needle
#
    let tie ={  message.channel.send({
        embed: {
          color: 15158332,
          title: "Rock Paper Scissors",
          fields: [
            {
              name: "Your choice",
              value: `\`\`\`css\n${args[0]}\`\`\``
            },
            {
              name: "My choice",
              value: `\`\`\`css\n${comp_val}\`\`\``
            },
            {
              name: "Output",
              value: "Tie. New balance: " + coins[message.author.id].coins
            }
          ]
        }
      });}

message.channel.send(tie)```
#

would that work?

quartz kindle
#

no

#

remove the { }

#

that approach wouldnt work anyway

#

you should save the embed, not the sending of the message, if you want to send it later

grizzled raven
#

you could also do this ```js
let i = yourChoice // 2 for example - paper
let j = theirChoice // 3 for example - scissors
let winner = ((i > j && !(i === "scissors" && j === "rock")) || (i === "rock" && j === "scissors"))

#

woah im slow xd

earnest phoenix
#

My bot keeps getting killed off discord voice channels with error code 4014, the api docs say it got kicked but it didnt, it didnt lose connection to internet either..

quartz kindle
#

but otherwise just stick to something like js let result; if() else if() {} if() else if() {} .... if(result === "win") { send win embed } else if(result === "lose") { send lose embed }

grizzled raven
#

only us pros can use my method imcool

#

and by us pros i mean me imcool imcool

quartz kindle
#

rps is a fun way to play around with optimization

#

there are so many ways you can try to optimize it

#

so many ways to design it

grizzled raven
#

so many bots with it

quartz kindle
#

xD

grizzled raven
#

i will choose a bot based on how well their rps code is optimised LOL

quartz kindle
#

lmao

queen needle
#

time to test it

#

didn't work

grizzled raven
#

also, would there be a point where your bot would be too big for sqlite

quartz kindle
#

then keep trying

grizzled raven
#

cause thats what im using rn

#

i keep forgetting i still need to shard lmao

quartz kindle
#

depends on how you use it, but most likely no

grizzled raven
#

how big is your sqlite file?

quartz kindle
#

about 10mb lol

grizzled raven
#

oh ok mines like 2mb

knotty steeple
#

how do u do sharding with sqlite

quartz kindle
#

sqlite supports sharding

knotty steeple
#

how to

quartz kindle
#

just use it normally?

#

honestly it depends on the library you use it with

#

but sqlite itself supports concurrent reads from multiple process, just not concurrent writes

#

for writing it uses a queue instead

knotty steeple
#

better-sqlite3

quartz kindle
#

if one process is writing, another process will wait in the queue

#

better-sqlite3 does all of this automatically

knotty steeple
#

nice

#

so just

#

use it normally

quartz kindle
#

yes, better-sqlite3 waits 5 seconds by default

knotty steeple
#

๐Ÿ‘Œ

quartz kindle
#

if a write takes longer than 5 seconds, it will throw an error

#

but most writes take milliseconds anyway

#

especially if you use wal mode and disable synchronization

knotty steeple
#

yea i already have wal mode on

queen needle
#

it works

quartz kindle
#

good job

#

here's a statement from the SQLite website

#

The SQLite website (https://www.sqlite.org/) uses SQLite itself, of course, and as of this writing (2015) it handles about 400K to 500K HTTP requests per day, about 15-20% of which are dynamic pages touching the database. Dynamic content uses about 200 SQL statements per webpage. This setup runs on a single VM that shares a physical server with 23 others and yet still keeps the load average below 0.1 most of the time.

knotty steeple
green vale
#

How can I get the owner of a bot in Discord.js?

#

(In this case, my bot)

quartz kindle
#

you can use client.fetchApplication()

#

this will get information about ownership of your own bot

green vale
#

Alright

tired nimbus
#

sql.run(DROP TABLE rank);

sql.run is not a function

quartz kindle
#

idk if you can see ownership or other bots tho (probably not)

green vale
#

Just what I was looking for

#

Thank you

quartz kindle
#

@tired nimbus what language/library?

#

sql library

tired nimbus
#

better-sqlite3

knotty steeple
#

also tim since ur here

#

hold on

#

to run queries u do .prepare() dont u

quartz kindle
#

better-sqlite3 uses the following syntax: database.prepare("query").run/get/all(params)

knotty steeple
#

yea

tired nimbus
#

oh I forgot about run()

tired nimbus
#

thx

quartz kindle
#

@knotty steeple .get() only gets a single row

#

.all() gets all matched rows

knotty steeple
#

o

#

i see

reef thistle
#

How can i get a bot?

quartz kindle
#

you mean add a bot to your server?

#

or make a bot?

reef thistle
#

Add bot to my server

#

For music

quartz kindle
#

look for a bot you like on the internet and invite it

#

for example, go to top.gg and search for a music bot

#

and click the invite button

reef thistle
#

Ok thanks

wanton nova
#

are you allowed to kick an old bot, and reinvite it under a new account? I rereleased my bot under a new profile, but I decided to change it back to the old one

#

its the same pfp and name

#

but different server count, id, and such

knotty steeple
#

pretty sure it still has to go through queue

wanton nova
#

yeah

#

i don't care about that

#

just wondering if its allowed in general

knotty steeple
#

yes

wanton nova
#

alright

#

thank you

knotty steeple
#

and wrong place to ask btw

wanton nova
#

oh

#

im a big fool

green vale
#

team

mint cypress
#

Hi

#

where Pro bot ?

quartz kindle
#

what bot?

#

whats the command for luca's wrong server thingy

mint cypress
#

Pro bot

quartz kindle
#

you might be in the wrong server

grizzled raven
#

if you set an id property in a schema, will mongoose's _id id getter override it?

summer torrent
mint cypress
#

i Mean In this server

#

where probot ?

#

@summer torrent

summer torrent
#

why you need probot

#

@hasty hedge

queen needle
#
 if(message.content.startsWith(PREFIX + 'blackjack')){
    
var a = 11;
var card = [2, 3, 4, 5, 6, 7, 8, 9, 10, a];
var c1 = card[Math.floor(Math.random()*card.length)];
var c2 = card[Math.floor(Math.random()*card.length)];
var cardtotal = c1 + c2;
message.channel.send('Your cards are a ' + c1 + ' and a ' + c2 + ', with a total of ' + cardtotal + '. Do you want to hit (:thumbsup:) or stand (:thumbsdown:)?').then(sentMessage => {
sentMessage.react('๐Ÿ‘');
sentMessage.react('๐Ÿ‘Ž');
});
    
    
    const filter = (reaction, user) => {
    return ['๐Ÿ‘', '๐Ÿ‘Ž'].includes(reaction.emoji.name) && user.id === message.author.id;
};

message.awaitReactions(filter, { max: 1, time: 10000, errors: ['time'] })
    .then(collected => {
        const reaction = collected.first();

        if (reaction.emoji.name === '๐Ÿ‘') {
            message.reply('You decided to hit');
        } else if (reaction.emoji.name === '๐Ÿ‘Ž') {
            message.reply('You decided to stand');
        }
    })
    .catch(collected => {
        message.reply('You didn\'t do anything, so now the game\'s over.');
    });
  }``` how could i make it add to their score if they hit thumbs up and if they hit thumbs down tell them they won unless their score is above 21
proper mist
#

can someone send me simple discord.js economy system

#

everything i see doesn't work

#

DM me pls

pale vessel
sudden geyser
#

If it doesn't work, you need to fix what doesn't work.

#

@queen needle you're waiting for reactions on the message the user sent, not the one the bot sent.

queen needle
#

oh

wild thorn
#

I want to make a game that relies on custom emotes, if a bot is sharded will all shards be able to access the custom emotes? or will only the specific shard that's connected to the guild containing the emotes be able to use them?

lyric mountain
#

I want to make a game that relies on custom emotes, if a bot is sharded will all shards be able to access the custom emotes? or will only the specific shard that's connected to the guild containing the emotes be able to use them?
@wild thorn all shards belong to a single bot

#

so custom emotes are shared

wild thorn
#

nice

#

thank you

#

I'm just trying to think ahead and make everything "shard proof"

lyric mountain
#

nice, that's actually a very good practice

tired cloud
#

Anyone has any idea how to make the request for PUT/guilds/{guild.id}/members/{user.id} to join a member to a guild?

#
const options = {
      method: 'PUT',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bot ${process.env.BOT_TOKEN}`
      }
    }
await fetch(`http://discordapp.com/api/guilds/${targetserver}/members/${userinfo.id}`,options)```
#

this is what ive tried

#

where bot_token is the bot token, targetserver is the id of the server where the bot has permissions to create invites and userinfo.id is the id of the user

#

im not sure where to add access_token and Bearer ${token}

#

where token is the token generated with the application with guild.join permission

astral yoke
#

Can someone help me make a setprefix command?

#

I just want a simple one that uses fs, however I'm not experienced within fs in any way, I'm going to read the documents though.

tired cloud
#

can i ask why fs?

astral yoke
#

I've seen fs before about how it's able to read a file and also edit the file then in the prefix/command definer you can change it to detect if the guild has a set prefix.

#

So if I do a setprefix command it'll change the package file and make the prefix.

tired cloud
#

i personally recommend to use a database

astral yoke
#

Like MongoDB?

tired cloud
#

since reading and writing files constantly can break files

#

specially json files

#

whatever you want

astral yoke
#

Hm.

tired cloud
#

you can use quickdb, sqlite, mysql, mongodb

#

enmap, etc etc

astral yoke
#

Ty.

tired cloud
#

i use sqlite, local, free, unlimited

#

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

astral yoke
#

My hosting provider dosen't support sqlite sadly.

#

Someone help this homeboy.

tired cloud
#

should i ask whats your hosting provider?

astral yoke
#

Heroku.

tired cloud
#

ah lmao

astral yoke
#

I'm a small developer and not wanting to pay for a VPS yet.

tired cloud
#

is it java or js?

#

d.js or jda?

astral yoke
#

d.js

true tundra
#

To put url in codes do you have to put the https://

earnest phoenix
#

well

tired cloud
#

well, shouldnt say this since many people think its the wrost "hosting" service

earnest phoenix
tired cloud
#

but you can use ^

astral yoke
#

I have a bad past with glitch.

tired cloud
#

free, "unlimited"

#

easy to use

earnest phoenix
#

well i mean

tired cloud
#

i use that for a bot in 305 guilds

#

with sqlite, works fine

earnest phoenix
#

it supports npm fully

tired cloud
#

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

earnest phoenix
#

so i mean

astral yoke
#

I'll recheck it out. Ty!

tired cloud
#

@true tundra thats for me?

#

:3

earnest phoenix
#

personally i mean for a free option it's great imo

true tundra
#

Like I want to put the url for my youtube do I have to put https:// for repl

tired cloud
#

Using

    const options = {
      method: 'PUT',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bot ${process.env.BOT_TOKEN}`
      },
      body: `{"access_token":"Bearer ${token}"}`
    }```
I get
```{ message: 'Invalid OAuth2 access token', code: 50025 }```
#

someone?

true tundra
#

await bot.change_presence(activity=discord.Streaming(youtube.com/demoniceagleyt)(name=f"/mhelp | {len(bot.guilds)} Servers", url="www.$do1.com"))

tired cloud
#

yeah, glitch is good, free, "reliable" and uptime is 99.99999%

true tundra
#

??

#

What did i do wrong
await bot.change_presence(activity=discord.Streaming(youtube.com/demoniceagleyt)(name=f"/mhelp | {len(bot.guilds)} Servers", url="www.$do1.com"))

sudden geyser
#

discord.Streaming(youtube.com/demoniceagleyt) don't look right

lyric mountain
#

glitch, totally """""""""""""""""reliable""""""""""""""""" and free

true tundra
#

What do i do then

lyric mountain
#

you put that inside quotation marks

#

and add the protocol before the url

#

most likely it's https://

true tundra
#

I put the url inside quotation marks?

lyric mountain
#

yes

#

I wonder, doesn't your guy's IDEs show syntax errors?

sudden geyser
#

@tired cloud does it work if you exclude Bearer or is that required?

true tundra
#

await bot.change_presence(activity=discord.Streaming("https://www.youtube.com/demoniceagleyt")(name=f"/mhelp | {len(bot.guilds)} Servers", url="www.$do1.com"))

sudden geyser
#

you need a comma after each key/value (whatever you call it in python, I can't remember)

lyric mountain
#

also, name=f"/mhelp | {len(bot.guilds)} Servers" will probably not work

true tundra
#

But thats my prefix

#

you need a comma after each key/value (whatever you call it in python, I can't remember)
@sudden geyser Wdym?

tired cloud
#

Let me try

true tundra
#

?

lyric mountain
#

your command's syntax is probably wrong

true tundra
#

Can u change it

lyric mountain
#

you gotta use , between arguments

#

unfortunately no, I don't know much python

#

but that seems quite wrong

#

check the docs for your lib

true tundra
#

I did its not helping

sudden geyser
#

Kuu whart part is wrong about the syntax?

true tundra
#
    await bot.change_presence(activity=discord.Streaming(https:
youtube.com/demoniceagleyt)(name=f"/mhelp | {len(bot.guilds)} S
ervers", url="www.$do1.com"))
                                                              ^
SyntaxError: invalid syntax```
tired cloud
#

without bearer it throws error

#

invalid json parse

#

with bearer it runs but { message: 'Invalid OAuth2 access token', code: 50025 }

true tundra
#

Im trying to make the bot have the streaming status

grizzled raven
#

if you set an id property in a schema, will mongoose's _id id getter override it?

opaque kite
#

await bot.change_presence(activity=discord.Streaming(name="put anything", url=my_twitch_url))

#

@true tundra

true tundra
#

Not working
await bot.change_presence(activity=discord.Streaming(name="YouTube", url=https://youtube.com/demoniceagleyt))

opaque kite
#

What?

#

What it will return?

lyric mountain
#

Kuu whart part is wrong about the syntax?
@sudden geyser pretty much everything after the first url I guess

opaque kite
#

Show me the error

true tundra
#

@opaque kite

    await bot.change_presence(activity=discord.Streaming(name="
YouTube",url=https://youtube.com/demoniceagleyt))(name=f"/mhelp
 | {len(bot.guilds)} Servers", url="www.$do1.com"))
                                                               
                  ^
SyntaxError: invalid syntax```
pine aspen
#
client.channels.cache.get(client.config.channels.botReportsAuditChannel).send(embed);
#

Hey, anyone see anything wrong here?

green vale
#

Is there any npm module for Discord.js music that's on v12?

pine aspen
#

I'm not sure.

lyric mountain
#

lavalink afaik

pine aspen
#

Saying can't read 'send' of undefined.

lyric mountain
#
client.channels.cache.get(client.config.channels.botReportsAuditChannel).send(embed);

@pine aspen the channel it's getting don't exist

pine aspen
#

Ok.

green vale
#

make a mechanism that creates the channel if it doesnt exist

opaque kite
queen needle
#

whats the api thing to say the server your bot is on

true tundra
#

@opaque kite Im trying to do stream status not playing status

queen needle
#

servers

opaque kite
#

You can do that check it out

true tundra
#

Its still not working

#

This is so confusing

queen needle
#

how do i add the server count of my bot on top.gg

opaque kite
#

@true tundra why python .. switch to discordjs

true tundra
#

Im on chromebook