#development

1 messages Β· Page 1377 of 1

steep socket
#

good idea!

ivory seal
#

is it possible to have a bot add a bot?

halcyon kite
#

well

#

tupper box does that

#

so yes it should be possible

earnest phoenix
#

no you cant

#

a bot user cannot authorize an application so it can't add a bot

solemn latch
#

Imagine bots inviting bots.

#

Suddenly got 200 bots

earnest phoenix
#

Imagine bots inviting bots.
@solemn latch pretty normal

solemn latch
#

Because a bot added 2 other bots, then those bots added bots.

#

Kek

halcyon kite
#

there would be more bots than people in discord

solemn latch
#

^

halcyon kite
#

at some point

solemn latch
#

I got 5000 members in my server, all bots. So pretty normal

blissful coral
#

Each user can create 32 bots

#

So

earnest phoenix
#

@blissful coral no stop

solemn latch
#

Killing the dream

ivory seal
#

wait

#

so u can do it?

#

any documentaion?

blissful coral
#

@earnest phoenix I would know

#

I have 32

#

All online and working

#

LMAO

halcyon kite
#

a bot cant create an application, but somehow tupper box can create his children of bots

#

and you can go over the 32 bot limit for him

#

so idk

stark abyss
#

does anyone has experience with basic react native, and is willing to help me a litte?

earnest phoenix
stark abyss
#
state = {
  teamScore: 0
}
                        <TouchableHighlight
                            onPress={() => {
                                alert('Alert Message!')
                            }}
                        >
                            <Text style={{color: 'green'}}>
                                {this.state.team1}: Goal
                            </Text>       

                        </TouchableHighlight>```
I want to change the teamScore value in a touchable highlight component not sure how
#

;-;

ivory seal
#

wait Tupper Box uses webhooks

#

is there any way for a bot application to add a bot application

proper bolt
#

no

halcyon linden
#

How is the key to leave a space of an empty embed field without returning undefined?

solemn latch
#

Its something specific. Lemme google it.

halcyon linden
#

the u\200b does not work to me

#

IDK

solemn latch
#

Oh it should.

#

Its
\u200B

halcyon linden
#

Ohh

#

Thanks a lot

solemn latch
tiny bough
#

anyone can help me

#

when i opened a port

#

i suddenly got tons of this warning

umbral zealot
#

sounds like your webhook code is repeating itself in a loop or an event

tiny bough
#

this is my code

dbl.webhook.on('ready', hook => {
console.log(Webhook running at http://${hook.hostname}:${hook.port}${hook.path});
});

dbl.webhook.on('vote', vote => {
console.log(User with ID ${vote.user} just voted!);
con.query(UPDATE USERDATA SET LASTVOTE=${Date.now()} WHERE DISCORDID=${vote.user};);
});

solemn latch
#

You can only have 10 webhooks made per channel or guild can't remember

stark abyss
#

I think you are trying to do something that you aren't allowed to

feral aspen
#
    if(!voiceChannel) return message.channel.send("You need to be in a voice channel to place music.");

    const permissions = voiceChannel.permissionsFor(message.bot.user);```
#

it's saying 'user' is undefined, did I do something wrong?

solemn latch
#

Its saying what your using user on is undefined I believe.

#

Message.bot doesn't exist

umbral zealot
#

I think you were looking for message.client

golden olive
#

Can anyone help me to make my bot?

solemn latch
#

I can help with errors or specific problems

#

Not sure i can dedicate enough time to help you with an entire bot

stark abyss
#

@golden olive What language do you know?

golden olive
#

@stark abyss english and hindi

stark abyss
#

I meant programming

golden olive
#

@stark abyss english

stark abyss
umbral zealot
#

Step 1) learn a programming language
Step 2) choose a library in that language
Step 3) actually start writing the bot
Step 4) ask for specific help if you need it

#

@golden olive if you don't even know what a programming language is, we can't help you.

stark abyss
golden olive
#

Ok

#

I have to learn from here

#

πŸ‘†πŸ‘†πŸ‘†

mild epoch
#

Hi

solemn latch
#

Hello

stark abyss
#

no that's djs if you do learn js that can be helpful

umbral zealot
solemn latch
#

If he reads the first page you linked to it will tell him to learn js first

mild epoch
#

What time is duration of verification?

umbral zealot
#

what verification

mild epoch
umbral zealot
#

5+ weeks

normal sage
#

4 - 8 weeks.

mild epoch
#

Ok

solemn latch
#

Officially 5+

mild epoch
#

Thanks

normal sage
#

o ok

golden olive
#

@golden olive Useful links for learning JavaScript and Node:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
@umbral zealot i have to learn all this things ??

solemn latch
#

A good chunk of them

stark abyss
#
state = {
  teamScore: 0
}
                        <TouchableHighlight
                            onPress={() => {
                                alert('Alert Message!')
                            }}
                        >

                        </TouchableHighlight>```
I want to change the teamScore value in a touchable highlight component not sure how

@stark abyss

crimson vapor
#

not all

#

but they are helpful

umbral zealot
#

You have to learn a language yes

solemn latch
#

Programming isn't something you learn overnight

umbral zealot
#

and that takes more than 5 minutes.

solemn latch
#

I'm years in and I still learn daily

normal sage
#

It will take a few weeks or months before you get used to it.

umbral zealot
#

@stark abyss honestly I don't think anyone here can help you with react or react native. I'd suggest you join the /reactiflux community instead, they have a lot of people that can help.

stark abyss
#

Aight okay thx

quick chasm
#

Wow thats alot of codes

#

How do you get a bot

solemn latch
stark abyss
#

@umbral zealot I can't find "reactiflux" server, can you dm a invite?

solemn latch
umbral zealot
#

@stark abyss literally /reactiflux

#

like that's the invite πŸ˜‚

stark abyss
#

found it

feral aspen
#

npm install -g ffmpeg-binaries

#

Even though I installed the above, its says the following

#

FFmpeg/avconv not found!

crimson vapor
#

did you install ffmpeg?

feral aspen
#

Yes.

crimson vapor
#

how?

#

npm install -g ffmpeg-binaries
this isnt ffmpeg

feral aspen
#

Wait no

crimson vapor
#

you need to install it

feral aspen
#

I installed this

#

why, what is the correct way to install it?

crimson vapor
#

that only install the required lib for node

feral aspen
#

npm install ffmpeg

crimson vapor
#

im not sure if that is it

#

tbh I don't use ffmpeg

golden olive
#

Please help me to make my botπŸ˜”πŸ˜”πŸ˜”

feral aspen
#

Please help me to make my botπŸ˜”πŸ˜”πŸ˜”
@golden olive Please watch a YouTube video.

golden olive
#

@feral aspen link please?

solemn latch
#

We linked you literally 15 sites to learn

feral aspen
#

Search How to create a Discord Bot V12

golden olive
#

Oki

#

Thankyou

earnest phoenix
ionic dawn
#

When you forgot to use ` and use " instead

crimson vapor
#

ewww

#

"

#

` || ' > "

solemn latch
#

Every platform i use " except discord

ionic dawn
#

Come on, don't eww me

solemn latch
#

Kinda weird.

quick chasm
#

Can someone help me

ionic dawn
solemn latch
#

Depends on the question

ionic dawn
quick chasm
#

With a bot

#

To get a bor

#

Bot

ionic dawn
#

You want to make a bot?

quick chasm
#

Yes

ionic dawn
#

What lang do you know

quick chasm
#

What is a lang

solemn latch
umbral zealot
#

Step 1) learn a programming language
Step 2) choose a library in that language
Step 3) actually start writing the bot
Step 4) ask for specific help if you need it

ionic dawn
#

JavaScript... Python, Java.. you know

quick chasm
#

Which not can play music

umbral zealot
#

They can all do it

feral aspen
#

Error: input stream: Could not find player config.. 🀯 AHHH

quick chasm
#

Do I need to make a new discord acount

umbral zealot
#

No.

quick chasm
#

What do I need to do

umbral zealot
#

See step 1.

solemn latch
quick chasm
#

And idk programming language

umbral zealot
#

Then learn one

proper bolt
#

step 1: learn a language

solemn latch
#

You'll have to learn

umbral zealot
#

javascript or python is fine

feral aspen
#

Can anyone let me know why it doesn't seem to play. This is the error I am getting. Error: input stream: Could not find player config

proper bolt
#

without learning you will just be relying on people to spoonfeed you

bronze quartz
#

Owo money

feral aspen
#
    if(!voiceChannel) return message.channel.send("You need to be in a voice channel to place music.");

    const permissions = voiceChannel.permissionsFor(message.client.user);
    if(!permissions.has("CONNECT")) return message.channel.send("I do not have permission to connect to the voice channel.")
    if(!permissions.has("SPEAK")) return message.channel.send("I do not have permission to speak in the voice channel.")

    try {
        var connection = await voiceChannel.join()
    } catch (error) {
        console.log(`There was an error connecting to the voice channel. ${error}`)
        return message.channel.send("There was an error connecting to the voice channel.")
    }

    const dispatcher = connection.play(ytdl(args[0]))
    .on('finish', () => {
        voiceChannel.leave()
    })
    .on("error", error => {
        console.log(error)
    })
    dispatcher.setVolumeLogarithmic(5 / 5)```
bronze quartz
#

Owo money

feral aspen
#

Hello?

bronze quartz
#

@feral aspen hey

feral aspen
#

Hi.

proper bolt
#

try putting it in the try catch block

#

the play stuff

bronze quartz
#

@feral aspen i play owo game

#

Sir

proper bolt
#

i forget if that affects async stuff

bronze quartz
#

Owo cf all

feral aspen
#

Like this?

bronze quartz
#

Umm owo game off?

proper bolt
feral aspen
#
    if(!voiceChannel) return message.channel.send("You need to be in a voice channel to place music.");

    const permissions = voiceChannel.permissionsFor(message.client.user);
    if(!permissions.has("CONNECT")) return message.channel.send("I do not have permission to connect to the voice channel.")
    if(!permissions.has("SPEAK")) return message.channel.send("I do not have permission to speak in the voice channel.")

    try {
        var connection = await voiceChannel.join()
    } catch (error) {
        console.log(`There was an error connecting to the voice channel. ${error}`)
        return message.channel.send("There was an error connecting to the voice channel.")
    }

try {

    const dispatcher = connection.play(ytdl(args[0]))
    .on('finish', () => {
        voiceChannel.leave()
    })
    .on("error", error => {
        console.log(error)
    })
    dispatcher.setVolumeLogarithmic(5 / 5)
} catch (error) {
  console.log(error)
}```
#

Like that?

proper bolt
#

no

#

where you are connecting

feral aspen
#

To a voice channel.

proper bolt
#

also dont use var

#

scoping issues

dreamy thistle
#

How do you track if something is a number or just letters in javascript?

#

In this case msgArguments

proper bolt
#

use Number.parseInt(x) or Number(x)

#

then Number.isNaN()

#

or

#

regex

feral aspen
#

Vilp

#

I still didn't understand what to do.

proper bolt
#
const voiceChannel = message.member.voice.channel;
    if(!voiceChannel) return message.channel.send("You need to be in a voice channel to place music.");

    const permissions = voiceChannel.permissionsFor(message.client.user);
    if(!permissions.has("CONNECT")) return message.channel.send("I do not have permission to connect to the voice channel.")
    if(!permissions.has("SPEAK")) return message.channel.send("I do not have permission to speak in the voice channel.")

    try {
        const connection = await voiceChannel.join()

    const dispatcher = connection.play(ytdl(args[0]))
    .on('finish', () => {
        voiceChannel.leave()
    })
    .on("error", error => {
        console.log(error)
    })
    dispatcher.setVolumeLogarithmic(5 / 5)
    } catch (error) {
        console.log(`There was an error connecting to the voice channel. ${error}`)
        return message.channel.send("There was an error connecting to the voice channel.")
    }
feral aspen
#

Alright, Ill be trying

proper bolt
#

ive never seen that error before

feral aspen
#

Error: input stream: Could not find player config

proper bolt
#

oh wait yeah that looks like a ytdl issue

feral aspen
#

it does say YTDL

proper bolt
#

yes its an issue with ytdl

#

what package are you using

#

and how are you getting the link

#

ytdl only accepts youtube links

feral aspen
#

This is what I usually do

#

!play <youtubeurl>

#

as well as

#

these are the packages

#

"ytdl-core": "^3.2.0"

#

const ytdl = require("ytdl-core")

pale vessel
#

dude upgrade your ytdl-core

#

it's 4.0.3 now

low basalt
#

ok im really stupid, how do i get it so my bot responds to commands if i @ it?

feral aspen
#

I made it 4.0.0 and yet giving the error

pale vessel
#

upgrade to latest

#

latest

feral aspen
#

I will try again

#

Error: input stream: Error parsing info: Unable to retrieve video metadata

#

Now this came up

#

Error: input stream: Error parsing info: Unable to retrieve video metadata

#

Flaze, could you help please?

pale vessel
#

you can ask @earnest phoenix

earnest phoenix
#

Hmm

feral aspen
#

Hello

earnest phoenix
#

It has to be the latest as 4.0.3

feral aspen
#

I changed that

#

Still errors

earnest phoenix
#

Which version currently?

feral aspen
#

4.0.3

earnest phoenix
#

Did you also restart the bot?

feral aspen
#

Yes.

#

About 20 times.

earnest phoenix
#

Log ytdl-core

#

console.log(ytdl)

feral aspen
#

Ahh alright

#
  getBasicInfo: [Function],
  getInfo: [Function],
  chooseFormat: [Function],
  filterFormats: [Function],
  validateID: [Function],
  validateURL: [Function],
  getURLVideoID: [Function],
  getVideoID: [Function],
  cache: {
    sig: Cache [Map] { timeout: 1000 },
    info: Cache [Map] { timeout: 1000 },
    watch: Cache [Map] { timeout: 1000 },
    cookie: Cache [Map] { timeout: 86400000 }
  },
  downloadFromInfo: [Function]
}
There was an error connecting to the voice channel. TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined```
#

Ignore the last line.

#

or not

earnest phoenix
#

Seems alright but can you do this?

console.log(require("child_process").execSync("npm ls ytdl-core").toString());```
feral aspen
#

Done.

earnest phoenix
#

What did it log?

feral aspen
#

The song played for some reason

#
+-- ytdl-core@4.0.3
`-- ytdl-core-discord@1.2.4
  `-- ytdl-core@3.4.2
#

I see 3.4.2

earnest phoenix
#

Do npm install ytdl-core in terminal to update to latest just to confirm

#

also i won't be here to help have school homework

feral aspen
#

the app crashed

earnest phoenix
feral aspen
#

the console was sending 1 million messages a second

#

Bruh, it used my lavalink thing for some reason

earnest phoenix
#

I want a raspberry pi to host my bot, it runs on 1 server and isn’t very large

#

Js

#

What model should I get

storm cliff
#

rpi4 or rpi3, ur choice

#

i recommend rpi4 though

feral aspen
#

I installed again @earnest phoenix

earnest phoenix
#

@feral aspen This whole thing doesn't seem to be the case, can you show how are you using the ytdl-core

#

@storm cliff it runs on 1 server so I want a reliable but cheap one

feral aspen
#

do I send you the !play code?

storm cliff
#

well go for the third model (rpi 3)

feral aspen
#

@earnest phoenix Could you slide to DMS/

eternal osprey
#

hey anyone that could help me out a bit πŸ˜‰

#
    }).then(() => {
        fetch("https://nycpokemap.com/raids.php?time=" + new Date().valueOf())
            .then(res => res.json())
            .then(
                data => {
                        const getName = id => nameList.filter(el => el.i === id)[0].n;
                        data.raids.filter(raid => getName(raid.pokemon_id).toLowerCase() === options.name.toLowerCase() && raid.level === (options.level ? options.level : 5)).forEach(raid => {
                        const name = getName(raid.pokemon_id);
                        console.log(name, + "\n" + raid.gym_name, + "\n" + raid.lat, + "\n" + raid.lng);
                        message.channel.send("**" + raid.gym_name + "**" + "\n" + raid.lat + "," + raid.lng + "\n" + "**Raid level: **" + raid.level + "  |  " + name + "  |  " + "**Pokemon Cp: **" +  raid.cp + "\n" + "**Egg Spawn Time: **" + getFormattedTime(raid.raid_spawn) + "\n" + "**Raid Start Time: **" + getFormattedTime(raid.raid_start) + "\n" + "**Raid End Time: **" + getFormattedTime(raid.raid_end))
                        .then(function (message) {
                        const reactionEmoji1 = message.guild.emojis.cache.find(emoji => emoji.name === 'valor');
                        message.react(reactionEmoji1);
                        const reactionEmoji2 = message.guild.emojis.cache.find(emoji => emoji.name === 'mystic');
                        message.react(reactionEmoji2);
                        const reactionEmoji3 = message.guild.emojis.cache.find(emoji => emoji.name === 'instinct');
                        message.react(reactionEmoji3);
                      })
                      
            ```` cannot readd property toLowerCase of undefined
copper whale
#

can anyone help me set up my rules bot. its not working

solemn latch
#

ah, unreadable code, my favorite.

#

either this getName(raid.pokemon_id) or this options.name is undefined @eternal osprey

small prairie
#
Cannot read property 'id' of undefined
at GuildMemberRoleManager.get _roles [as _roles] (/root/bot/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:32:101)
at GuildMemberRoleManager.get cache [as cache] (/root/bot/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:41:17)
at Client.<anonymous> (/root/Arch_Bot/server.js:2735:37)
at Client.emit (events.js:322:22)
at MessageCreateAction.handle (/root/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)```
#

Line 2735: let role = message.member.roles.cache.has("597689309918658570");

#

Is that an error from my side or d.js?

eternal osprey
#

@solemn latch how is my code "unreadable

solemn latch
#

super long string concatenation

earnest phoenix
#

how does i use an emoji in an embed? (coding in java with jda)

small prairie
#

any idea about mine?

solemn latch
#

looking around the source code on djs yours will take a bit.

earnest phoenix
#

What is the minimal allowed status update interval?

small prairie
#

aight

gentle lynx
#

in javascript, how can I join a string into an array? for example lets say we have var x = '1,4,3' how can i turn that into an array like [1, 4, 3]

earnest phoenix
#

20 sec right?

steep socket
#

im having strange issues

gentle lynx
#

is it .join?

steep socket
#

so i made a translate command for my bot

solemn latch
#

20 seconds is fine.

#

ideally a few minutes is better

steep socket
#

it can only translate once, then it breaks

#

what am i doing wrong

solemn latch
#

global variables?

earnest phoenix
#

I use 21 secs

steep socket
#

i clear them after its executed

solemn latch
#

or just dont use global

earnest phoenix
#

But I can change it to 30

steep socket
#
    @commands.command()
    async def trans(self,ctx,arg,lang):
        translator = Translator()
        translated = translator.translate(f'{arg}', dest=f"{lang}")
        await ctx.send(f'{translated.text}')
        translated = None
        lang = None
        arg = None
#

this is the code

#

wat am i doing wrong?

#

what stupid thing have i done this time

slender thistle
#

I don't see any errors or whatever that's wrong with it

steep socket
#

i will show u the logs

slender thistle
#

And why are you resetting everything to None

steep socket
#

because it throws weird exceptions when i dont

slender thistle
#

Yeah I'm not downloading crap on phone

steep socket
#

Traceback (most recent call last):
File "/home/meisme/.local/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/home/meisme/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/meisme/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'group'

slender thistle
#

Is that all

steep socket
#

its the exception

#

it repeats like 3 times

slender thistle
#

Fun

steep socket
#

fun indeed

slender thistle
#

Unless that's an error caused by the translator instance, I'm bound to assume that the error doesn't happen in that snippet

steep socket
#

its the only code in the file tho

solemn latch
#

honestly, zero clue @small prairie
looked around couldnt find anything :/

steep socket
#

ignore the warning its just vscode being weird

small prairie
#

honestly, zero clue @small prairie
looked around couldnt find anything :/
@solemn latch Same it just started happening in one server
my guess is discord broke something
I just made a new server and it has some new weird stuff

slender thistle
#

It's double underscores on each side

steep socket
#

?

slender thistle
#

For the init method

steep socket
#

?? it works fine for me

#

all my cogs have one underscore and they work fine

#

Β―_(ツ)_/Β―

solemn latch
#

I would say its an intent or something, but even if you had zero roles cached i dont see why it would error.
honestly, might be a "tim" level issue lol @small prairie

gleaming willow
#

Traceback (most recent call last):
File "/home/meisme/.local/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/home/meisme/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/meisme/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'group'

slender thistle
#

It doesn't work

small prairie
#

I would say its an intent or something, but even if you had zero roles cached i dont see why it would error.
honestly, might be a "tim" level issue lol @small prairie
@solemn latch Haha

slender thistle
#

You're just not using anything attached to the instance of your class/cog

steep socket
#

after putting two underscores it stopped working completly

small prairie
#

But the thing is
its only happening in one server

steep socket
#

You're just not using anything attached to the instance of your class/cog
@slender thistle wdym

slender thistle
#

it stopped working completly
Detailed exception logs could help way more

#

You're just not using anything like self.x

halcyon kite
solemn latch
#

command needs to be defined

earnest phoenix
#

Read the error

steep socket
#

@slender thistle same logs but happens at first time

halcyon kite
#

i did

slender thistle
#

Do you use regex anywhere

steep socket
#

nope

#

well the trnaslator uses regex

#

but i have no control over that

earnest phoenix
#

Hmm

steep socket
#

im assuming it does

dusky mason
#

anyone have an idea on how to make it whenever my bot joins a new server, it will dm me the server details (members, name, etc.) in python?

slender thistle
#

Use the on_guild_join event

solemn latch
#

spitballing here, this command is guild only right? its erroring actually in a guild correct @small prairie ?

halcyon kite
slender thistle
#

Wtf googletrans

solemn latch
#

lol

#

@halcyon kite is command defined

dusky mason
#

i mean i know that

#

but like how would i make it dm me

#

and fetch the details

#

rn i have this

slender thistle
#

user = get_user(yourid)
user.send

dusky mason
#

and it doesn't work

#
@client.event
async def on_server_join(server):
    owner = await client.fetch_user(337025706426892288)
    await owner.send(f"Joining {server.name}: {len(server.members)} Members")```
small prairie
#

spitballing here, this command is guild only right? its erroring actually in a guild correct @small prairie ?
@solemn latch Yes i return it if(!message.member)return

solemn latch
#

ahhh

#

i ran the line a few times and nothing

small prairie
#

its just happening in ONE PARTICULAR server

solemn latch
#

so wild

slender thistle
#

on_guild_join

small prairie
#

discord must have tried something out which messed up

dusky mason
#

oh

#

shite

slender thistle
#

guild not server

dusky mason
#

it was before rewrite

solemn latch
#

such an annyoing issue.

small prairie
#

that server is really weird
there are some server settings which i have never seen before

solemn latch
#

okay yeah, maybe its diffrent

dusky mason
#
async def on_guild_join(guild):
    owner = await client.fetch_user(337025706426892288)
    await owner.send(f"Joined {guild.name}: {len(guild.members)} Members")```
#

like that?

solemn latch
#

thats actually wild

small prairie
#

the roles dont get deleted before i actually reload my discord

dusky mason
#

only way is to test

small prairie
#

the worse thing
i need that server for an event in like 2 days ;-;

halcyon kite
#

@halcyon kite is command defined

#

@solemn latch nope should i change something?

small prairie
#

i hate discord ffs
but i will still login tommo

slender thistle
#

only way is to test
@dusky mason yup

#

but it does look like it will work

solemn latch
#

you need to define command to use the variable command. so yes. make sure command is defined @halcyon kite

dusky mason
#

yeah ill prob add "pretty" things lol

#

to make my pelase

solemn latch
#

lmk when you figure it out legendary.

dusky mason
#

please* and also ill prob add that it sends me a server inv

small prairie
#

you got it

solemn latch
#

i am really curious

slender thistle
#

please* and also ill prob add that it sends me a server inv
@dusky mason bad

dusky mason
#

it worked

#

and why is that bad?

#

oh privacy

#

lmao

small prairie
#

Yes and against discord's tos

solemn latch
#

people have gotten banned from here for doing that iirc.

#

yeah

dusky mason
#

yeah lmao

#

well lemme add embeds

#

cuz just

small prairie
#

people still do that.....

dusky mason
#

(server name) : (members) looks horrible

small prairie
#

i'll just delete the server if i rage lmfao

dusky mason
#

what if i implement my server info command

#

to send that

small prairie
#

im not good with anger

#

Yea you can do that its basically the same thing

dusky mason
#

ohh that would save me a lot of tim

small prairie
#

you get the same guild properties

dusky mason
#

time*

small prairie
#

just none of the member ones if you have any of those in server info command

dusky mason
#

i love how huge my server info is

slender thistle
#

people have gotten banned from here for doing that iirc.
@solemn latch Yup and I might've happened to be the one handling a case like that

dusky mason
small prairie
dusky mason
#

pog

#

well nonpog

solemn latch
#

the one where the mods made a server and the user joined just after being told itll get him banned

dusky mason
#

well thank you for telling me lol cuz i didn't know

slender thistle
#

So yeah, I believe in your common sense and human decency kaipeace2

#

LMFAO RIGIDITY

summer acorn
#

quick question; How do I remove a singular user's reaction without removing all users' reactions? - in djs

small prairie
#

hahahhaha i remember that

summer acorn
#

I see I am blind

slender thistle
#

Silly

solemn latch
#

sad part is, i dont think it was malicious.
people sometimes are just completely dumb.

summer acorn
#

I was literally looking at the docs for like 30 minutes

small prairie
#

:sad:

#

lmao i get it
i legit couldnt find a thing right in front of me for like 2 hours before i gave up

slender thistle
#

Well I mean they were told multiple times by mods to not do it

solemn latch
#

yeah.

small prairie
#

i guess they were dumber then that lmfao

dusky mason
#

alr i copied the serverinfo code

#

time to try

#

wait im so dumb

#

i never even put in send embed lol

slender thistle
#

Case on point, they still did it and frankly, I'm bound to believe they have an alt here still to this day.

small prairie
#

i wanna kill myself and take discord with me :hate:

solemn latch
#

syntax
, between elements

dusky mason
#

wait we are still talking about the invite

#

thing

#

dang

umbral zealot
solemn latch
#

also gotta close brackets every { needs a }

small prairie
#

i guess , after args:true

#

nice fast thingy
i cant even make those arrows straight from shareX

earnest phoenix
#

Hi, I am trying to setup vote webhook

#

o

small prairie
earnest phoenix
#

this is development

#

lemme ye

#

ye

small prairie
#

Yup

dusky mason
#

im so big brain

#

no point of using this feature

#

since i have a problem with my intents

small prairie
#

i mean server add isnt a privileged intent
should it really be hard

dusky mason
#

not that

#

since im sending myself user data (like amount of users for example) it can't

#

since i don't have that intent

#

i do have it enabled

#

but i have some problem

slender thistle
#

Ah

#

F

dusky mason
#

ill show u shiv

#

lets go

#

just the guild info

#

up top

slender thistle
#

Lesgo

dusky mason
#

i should add under

#

guild number : (guild)

#

since it dms me the number

#

alr @slender thistle time for the hard thing

#

the intents

slender thistle
#

gl

dusky mason
#

and everything

#

and it's enabled in the portal

#

but look at this

#

and im in that role

#

and i fixed this last time by enabling in the portal

#

but now it's enabled

slender thistle
#

Try to reenable it xd

dusky mason
#

ill give it a go

#

but tysm

#

with the other stuff

#

also is on_guild_leave a thing

dense patio
#

how do you send a dm to a user regardless of the shard they're in? (discord.js v12)

slender thistle
#

on_guild_remove

dusky mason
#

bet

#

thanks shiv

dense patio
#

anyone?

solemn latch
#

broadcast eval it.

dusky mason
#

wait shiv

#

once more

#

lol

#

my eval command

earnest phoenix
#

Vote tracker against of tos?

slender thistle
#

a

solemn latch
#

you might run into an issue where if a user is in 2 guilds with your bot on separate shards it will send 2 dms. so youll need a way around it.

dusky mason
#

i think the issue was

#

it's not really eval

#

like if i do p!eval print('hi')

dense patio
#

alright thanks

dusky mason
#

it says

#

none

#

and then if i do p!eval await ctx.send('hi')

#

this happens

#

kinda weird

slender thistle
#

It's not

dusky mason
slender thistle
#

You're just basically outputting he last returned value

dusky mason
#

well i mean

#

yeah

#

but i mean for the other

#

its not like a working eval

slender thistle
#

print() doesn't return anything but instead writes to stdout

dusky mason
#

oh

#

is that fixable

slender thistle
#

you can use redirect_stdout by some fucking library I don't remember

upper elm
#

so I asked this yesterday, but i want to ask again so i can get a second opinion, I'm looking into heroku databases and i want to store data like a currency system that i can easily acess and change. Should I use Redis or Postgres?

dusky mason
#

i mean i honestly don't care less,i don't even need eval

#

i thought like bots have it

#

and its cool

#

to multiply 1823947829035482390581902584*90128359083190568493

#

so

#

i just made one

slender thistle
#

Well yeah, the idea is that you redirect stdout values from some point, print them, and then retrieve them to then post in a message from the bot

#

how hard it will be for you I can't say, but it was relatively simple for me with the amount of copypasting I did

dusky mason
#

huh

#

that was confusing

#

oh

#

i see

#

lmao

delicate zephyr
#

wisdom so wise

north birch
#

Okay guys so I'm building a weapon command in my bot, when you attack with that weapon I want it to be deleted from user inventory, idk how to do it cause I cannot use DB.delete or var delete
I'm going crazy trying to find a solution lmao heeelp

upper elm
#

what language

solemn latch
#

whats the error

upper elm
#

so I asked this yesterday, but i want to ask again so i can get a second opinion, I'm looking into heroku databases and i want to store data like a currency system that i can easily acess and change. Should I use Redis or Postgres?

solemn latch
#

isnt redis an in memory database?

small prairie
#

@solemn latch Lmao the error fixed itself
Defo discord trying out something
had a small server outage too before that happened

north birch
#

what language
@upper elm JS

cinder patio
#

yes

solemn latch
umbral zealot
#

uhh

#

where's the rest of the file

#

no

solemn latch
#

why did you delete everything else

umbral zealot
#

this file

solemn latch
#

you had other stuff here

umbral zealot
#

this isn't valid JS

north birch
#

so I asked this yesterday, but i want to ask again so i can get a second opinion, I'm looking into heroku databases and i want to store data like a currency system that i can easily acess and change. Should I use Redis or Postgres? @upper elm

That's why i switched to AWS Lmao

umbral zealot
#

no

solemn latch
#

green means add, red means remove

umbral zealot
#

this is a "difference" indicator, as in, they're telling you, "add this line that has the +"

#

This is what happens when someone with no JS knowledge just blindly shovels code.

upper elm
#

That's why i switched to AWS Lmao
@north birch what's that i'm pretty new lol

umbral zealot
#

So why are you making a bot in JS, darling?

north birch
#

@north birch what's that i'm pretty new lol
@upper elm It's amazon vpc, it has free tier for 12month

solemn latch
#

redis is in memory storage. meaning if the redis restarts you lose that info afaik.

upper elm
#

alr

north birch
#

alr
@upper elm Try it out

upper elm
#

i will, thanks

north birch
#

You're welcome

umbral zealot
#

Ok well then learn javascript first

#

otherwise you're not making a bot, you're just mimicking someone else's code

#

which holds absolutely no value in this world.

#

Ok so?

solemn latch
#

there are plenty of decent 13 year old devs

umbral zealot
#

Then don't make a bot!

#

If you don't have time to learn, you don't have time to make a bot. it's that simple.

upper elm
#

im god damn 13
me too

solemn latch
#

i saw a video where a 13 year old made a 3d game engine from scratch

#

crazy stuff.

upper elm
#

game engine?

#

that's wild

umbral zealot
#

@covert gale Coding too complicated? Don't have time to learn? There are many thousands of bots available already and one of them is bound to have exactly the features you want. No programming necessary, no setup, no hosting required, all 100% free and ready for you to use! Just head on over to https://top.gg/ and checkout the various bots (there are thousands of them) and you'll most definitely find something for your needs.

solemn latch
#

lemme see if i can find it.

dense patio
#

i'm getting this error:
UnhandledPromiseRejectionWarning: SyntaxError: Unexpected identifier
on this code:
client.shard.broadcastEval(`(${user.send(vEmbed)})`);
but the message still sends and works fine, it just sends an error

(discord.js v12)

north birch
#

Guys ill building a weapon command, i want the weapon to delete after used but i dont know how to do it cause i cant do quickdb delete or using a var to clear cause the data are in a text

#

What do you guys suggest me?

solemn latch
dense patio
#

woo do you know what the issue is

solemn latch
#

ngl, ive yet to shard.

dense patio
#

lol

earnest phoenix
#

@dense patio the brackets are causing that

#

The () are part of the actual eval string and the other portion is a template expression

#

The expression gets run but the eval thing can't understand why the hell there is a random ()

umbral zealot
#

If you want to make your own bot you have to start by learning the language

earnest phoenix
#

afaik

dense patio
#

i see

#

so how do i remedy this

earnest phoenix
#

remove the brackets ig

umbral zealot
#

it's like "I don't want to go to the restaurant, I want to make my own food" and then you don't understand what "preheating the oven" means. You can't have it both ways, either learn javascript first, or don't make a bot.

earnest phoenix
#

this tbh

#

Click the star or be banned from dbl forever

solemn latch
#

ah

upper elm
#

or any language you want that has a discord variation really

earnest phoenix
#

@dense patio also why are you evalling that anyways

dense patio
#

to make sure they get the dm regardless of the shard they're in

#

it sends a dm when they vote

earnest phoenix
#

user.send returns a Promise and you're trying to eval that Promise object on every single shard

solemn latch
#

he doesnt know what shard the user is on

earnest phoenix
#

to make sure they get the dm regardless of the shard they're in
then why is there a template expression

north birch
#

Oi please help lmao

earnest phoenix
#

the template expression is run outside the broadcast eval

#

remove the (${ and })

dense patio
#

i looked up broadcast eval on some guide site and that's what it advised

#

ok

earnest phoenix
#

smh

dense patio
#

now this:

north birch
#

Where is the non-defined variable?

solemn latch
#

the non defined variable?

north birch
#

Check the code for 'user'

dense patio
#

the variable is fine, as it worked before

#

the issue is the broadcastEval

north birch
#

the non defined variable?
@solemn latch LMAO Sorry bout that im not english LMAO

solemn latch
#

the variable only exists on the shard your running the broadcast eval on.

#

right?

dense patio
#

yeah

earnest phoenix
#

bot off?

dense patio
#

and the thing i had before with broadcastEval worked

solemn latch
#

it was sending to the user?

dense patio
#

yep

solemn latch
#

was the user on the same shard the broadcast eval ran on?

dense patio
#

yeah

#

but it still is

solemn latch
#

then i dont think it worked, since it had the variable.

dense patio
#

there's only 1 shard atm, i'm just future proofing it

solemn latch
#

if the user wasnt on the same shard, i dont think it would have worked.

#

oh okay. well then yeah what you had before would work.

#

but you also dont need to broadcast eval it

#

you can just run it.

dense patio
#

i know

solemn latch
#

since its practically the same thing.

dense patio
#

but i want to get this done asap

#

with my other bot i was stuck for so long trying to figure this all out

#

caused a lot of mess

#

i haven't done anything with broadcast eval though so that's why i'm confused

north birch
#

Im looking for some help to make this command delete the weapon after it moves to equipped weapon, but idk how, if anybody have suggestions ping me:

const db = require('quick.db')

module.exports = {
name: "equip",
description: "Equip a weapon",

async run (client, message, args, config) {
    let weapons = db.fetch(`${message.author.id}_weapons`)
    let equippedweapon = db.fetch(`${message.author.id}_equipweapon`)
    if(armi === null) {armi === 'Youre pooooor!'};

    if(!args[0]){return message.channel.send(`available weapon: ${weapons}`)}

    if(args[0] === 'TestWeapon') {
        message.channel.send('You equipped TestWeapon!')
        db.set(`${message.author.id}_equipweapon`, 'TestWeapon')
        
    };
    
}}
umbral zealot
#

lmao.quick.db.gif

north birch
#

?

umbral zealot
#

quick.db is crap.

eternal osprey
#

hey

feral aspen
#

I prefer using MySQL as a database.

umbral zealot
#

Nobody asked πŸ˜›

feral aspen
#

😦

dense patio
#

lol

north birch
#

It's not that bad but now transfering database it's...well...you know

feral aspen
#

It's not that bad but now transfering database it's...well...you know
@north birch True.

eternal osprey
#
client.on('message', message => {
    if(message.content === `!kill`){
        const exampleEmbed = new Discord.MessageEmbed()
        .setColor('#9400D3')
        .setTitle('**A crime has been commited!!**')
        .setAuthor('Tendo Reactions')
        .setDescription(`${message.author} brutally killed ${message.mentions.members.first()}`)
        .setFooter("Command created for Tendo!")
   
        message.channel.send(exampleEmbed)
    

    }```
why does my bot not work when i use !kill @fair rover\
#

the !kill works

#

but !kill @fair rover does not

feral aspen
#

You did not set an args[0]

umbral zealot
#

Yeah sure it's a hassle but, as a wise man once said, just because you've invested a lot of time in a mistake, doesn't mean you should hang on to it.

eternal osprey
#

owh yeah of course

#

thank man!

feral aspen
#

@eternal osprey

#

here

solemn latch
#

your also checking if content === !kill
not startswith

north birch
#

Yeah sure it's a hassle but, as a wise man once said, just because you've invested a lot of time in a mistake, doesn't mean you should hang on to it.
@umbral zealot Yeah ik but my friend just started playing it i dont want to transfer all data lmao

eternal osprey
#

aha i get it!

#

thanks boys

#

or girls

umbral zealot
#

time to learn I guess, or learn ot read their docs better. but quick.db has very little actual functionality over something like keyv, and is much slower than pretty much literally anything you can find out there Β―_(ツ)_/Β―

north birch
#

But now forget about the quality of the database, is there a method that i can remove the "weapon" from the data without deleting all?

proper bolt
#

is quick.db one of those fs wrappers for json

solemn latch
#

get all the weapons, remove the one you want removed, set all the weapons.

feral aspen
#

But now forget about the quality of the database, there is a method that i can remove the "weapon" from the data without deleting all?
@north birch If you are starting small, use .Json

proper bolt
#

no

umbral zealot
#

N

proper bolt
#

dont use a json database

north birch
#

@north birch If you are starting small, use .Json
@feral aspen My database is .json

proper bolt
#

bad practice

#

hard to migrate

feral aspen
#

Yes true.

proper bolt
#

do it right once and dont worry about it

north birch
#

Well fck

umbral zealot
#

y'all are wrong

#

quick.db isn't a json database

proper bolt
#

oh isnt it sqlite

feral aspen
#

I used json and Ill be spending my entire life migrating to MySQL

umbral zealot
#

It's a wrapper around sqlite that stores stringified data.

north birch
#

My database is ''.json'' but im using quick.db that is sql

#

Im confused

umbral zealot
#

Anyways @north birch quick.db doesn't have a way to remove "only part of the data", so you'd need to get the data, modify it, then set it back

north birch
#

It's what i want to do

#

But

#

How

umbral zealot
#

if you want a wrapper that doesn't suck, look up Enmap instead (disclaimer, I made enmap)

solemn latch
#

get the weapons. remove the element you dont want, then set it.

north birch
#

Guys i got the concept but how i can actually do it LMAO

solemn latch
#

what part

umbral zealot
#

This is normal javascript manipulation

solemn latch
#

the getting part? the removing an element, or the setting part.

umbral zealot
#

removing something from an array or object is just.. code.

north birch
#

This is normal javascript manipulation
@umbral zealot I tried but my database, idk why, take all in a text file

#

It's not an object

umbral zealot
#

no no just fetch or get the data

north birch
#

I fetched it

umbral zealot
#

right so take that

north birch
#

Wait i try something

umbral zealot
#

modify it

#

and writ it back

north birch
#

Well yes i did something wrong at the beginning It should work now

feral aspen
#

Just quick question, suppose I write a code in the ``` but I dont want it to all be the same color but all like different colors\

solemn latch
#

depends on the language

#

js?

feral aspen
#

I put JS?

solemn latch
#

```js

```

#

yeah

feral aspen
#

Thank you! πŸ™‚

#

If I want to make it all one color

#

What is it that I should do?

#

Like all red, all blue, all green, etc.

#

should I write the hex color?

solemn latch
#

the color rules are very specific

feral aspen
#

Thanks.

thick gull
#

wtf they're trying to sell me discord formatting guide

#

"Want to take this guide with you on the go?"

#

hUH?

north birch
#

So delete weapons['TestWeapon'] dont wanna actually delete the shit*y weapon out @solemn latch @feral aspen

feral aspen
#

The ping.

#

Not really expert in database, sorry.

north birch
#

Np

solemn latch
#

oh are you talking once youve gotten it?

north birch
#

This is the database console.log before and after
[
'TestWeapon',
'TestWeapon2',
'TestWeapon3'
]

buoyant aspen
#

how do I get a member by ID?

#

discord.js

solemn latch
#

I would filter out the item you dont want from the array.

north birch
#

I never did that before but i will try

thick gull
#

how do I get a member by ID?
guild > members > cache > get

#
#

should help with getting member by id

buoyant aspen
#

I'll try that

eternal osprey
#

how come that this code is not working? ```js
if(message.content.startsWith === !poke){

    const pokeUser = message.mentions.members.first()
    if(!pokeUser) return;

    const exampleEmbed4 = new Discord.MessageEmbed()
    .setColor('#9400D3')
    .setTitle('**Pokes have been transferred!!**')
    .setAuthor('Tendo Reactions')
    .setDescription(`${message.author} poked ${kissUser} till he left holes in his body!!`)
    .setFooter("Command created for Tendo!")

    message.channel.send(exampleEmbed4)


}
solemn latch
#

thats not how startsWith works

eternal osprey
#

yeah i only should use the prefix probably

cinder patio
#

It's a function

upper elm
#

I think it would be if message.content.startsWith('poke')

dusky mason
#

there are plenty of decent 13 year old devs
@solemn latch agreed

#

i am one of them

#

so don't feel discouraged or anything

#

age is just a number?

quartz kindle
#

age is your character level

#

you're a lvl 13 noob

solemn latch
#

shoot, i had a bad build

quartz kindle
#

xD

dusky mason
#

lmao tim

quartz kindle
#

but if you train your EVs right, you can become stronger than higher level characters

dusky mason
#

almost level 14

#

do you have xp boost

quartz kindle
#

lmao

#

i just grind a lot

opal plank
#

stackoverflow is the cheat sheet wiki

north birch
#

shoot, i had a bad build
I see i sucks at filtering objects

solemn latch
north birch
#

I did not expect this for removing an object in that db LMAO

solemn latch
#

thanks veld

#

quickdb is rough

north birch
#

I see

prisma bramble
#

while i was testing my bots i found out even if i invite the bot using all the permissions except Admin (in this case im focusing on Embed Messages) , my bot is not able to send embed in channels where everyone is not allowed to embed links. and it causes my bot to crash. Any fix? it works fine if i invite the bot with Admin perms

solemn latch
#

intresting.

#

I thought embed links where the embed from links ngl.

prisma bramble
#

i mean, it cant send embedded messages. Most of the error checks returns an embed message in my bot. I have to go through each of them to remove the embeds if i want to fix this which i dont wanna do

solemn latch
#

yeah, I am unaware of the permission that would do that.

#

intresting. embed links removed indeed doesn't let bots send embed.

#

the fix would be to require the "embed links" permission with your bot.

#

you could also add a check if the bot has that permission, and give a generic error when it happens.

dreamy thistle
#

eing?

feral furnace
#

Guys i have a problem with my bot. I tried my command in windows but my command is not working in linux

#

i'm using shelljs in linux

cinder patio
#

Bremchu, use the isNaN function

feral furnace
chilly bison
#

eing?
@dreamy thistle if(isNaN(Number(deleteNumber))) // do something

feral furnace
#

i'm checking the function is executed or not, it says function is executed

#

it return stderr also

dreamy thistle
#

thank you guys

#

:=))

feral furnace
#

is there anyone has any idea?

#

i want to send dm to specific user

#

here is dm message

#

but it's not working on linux

north birch
#

i'm checking the function is executed or not, it says function is executed
@feral furnace I will just add a console.log when you want to check

feral furnace
#

@feral furnace I will just add a console.log when you want to check
@north birch i added console.log to check whether the function is executed or not. As you can see, function is executed

solemn latch
#

im confused, why not just process.exit() when you want to restart the bot when using a process manager.

feral furnace
#

how can i handle if it returns error?

#

is there any way

earnest phoenix
#

@feral furnace How are you going to send a message after you restart the bot

#

You cant lmao

feral furnace
#

i can

earnest phoenix
#

Wtf?

feral furnace
#

okay, let me show you

earnest phoenix
#

Wtf

feral furnace
earnest phoenix
#

It didnt work thats why

#

If it worked you wouldnt have seen that msg

feral furnace
#

lul

#

if it worked i should get code, stdout and stderr

earnest phoenix
#

πŸ€¦β€β™‚οΈ

#

Your iq is very high sir

#

Thats like doing

dreamy thistle
#

does the same

#

using the function

earnest phoenix
#

process.exit()
message.channel.send(β€˜successfully restarted bot’)

#

@dreamy thistle just do if(!deleteNumber)

north birch
#

@solemn latch What filter can i apply for excluding the specific weapon i used

dreamy thistle
#

@dreamy thistle just do if(!deleteNumber)
@earnest phoenix but thats for other case

solemn latch
#

filter(weapon => weapon != equippedWeapon)

dreamy thistle
#

i want a one who replys to ?clear asadsasd

earnest phoenix
#

Ok then

#

parseInt(input)

#

And negate that in an if statement

dreamy thistle
#

hum

chilly bison
#

@dreamy thistle just do if(!deleteNumber)
@earnest phoenix if(!deleteNumber instanceof Number)

earnest phoenix
#

Why would you do that..?

north birch
#

filter(weapon => weapon != equippedWeapon)
@solemn latch For weapons you mean the name of the weapon or all weapons fetched?

dreamy thistle
#

cant you use β‰  in javascript?

earnest phoenix
#

Yea you can

solemn latch
#

filter is a function that goes through every element of the array its reading from

#

weaponArray.filter(weapon => weapon != equippedWeapon);
the weapon => weapon != equippedWeapon gets run for each weapon in the weaponArray

north birch
#

It's..not working? i dont know why

solemn latch
#

what way is it not working?

#

also weapon looks like a wrong word now

north birch
#

im doing const newweapons = weapfilter.filter(weapfilter => weapons!= equippedweapon);

#

weapfilter = weapons

solemn latch
#

thats not the way it works.

north birch
#

Nice

#

LMAO

#

Im not experienced with filter

#

sorry

solemn latch
#

your essentially creating a function within a function(callback)

#

so you need to use its own variables in that callback

#

weaponArray.filter(weapon => weapon != equippedWeapon);
weaponArray is seperate from weapon

#

so
const newweapons = weapfilter.filter(weapon => weapon != equippedweapon)

#

weapon => weapon != equippedweapon < is checked for each weapon in weapfilter

north birch
#

Okay

solemn latch
north birch
#

Sorry bout that i never did filter

solemn latch
#

np

#

its actually super common to have callbacks like this in code

#

its really useful to learn.

north birch
#

Perfect

solemn latch
#

lmk if it works

north birch
#

Aaaand it's working perfectly

#

Ty

dreamy thistle
#

how to delete a message posted by the bot?

chilly bison
#

@dreamy thistle <message>.delete();

dreamy thistle
#

.then(messageReaction => {
message.delete({ timeout: 2000 });

#

i have this but deletes the command posted by you

#

not by the bot

faint arch
#

for my bot i need to verify over how many guilds?

chilly bison
#

for my bot i need to verify over how many guilds?
@faint arch to get verified you need 76 guilds

#

or more

#

but you can't get the badge anymore

sharp thicket
#

if ur bot is not verified it cannot join more then 100 guilds

#

as of october 8

faint prism
#

@earnest phoenix Did you see .NET core 5 dropped today?

fierce arch
#

before I lose it - how do I get the role object from a role ID? Discord.py

sudden geyser
#

@fierce arch you could use Guild.roles to get a list of roles and use one of discord.py's utility methods: ```py

message.guild.roles -> List[Role]

discord.utils.get(message.guild.roles, id=the_id)```
I think it goes like this, but you can review the docs for more.

fierce arch
#

oo okay I'll try it

blissful coral
#

.utils LULW

solemn latch
#

theres the create instant invite perm

late light
#

anyone know how i can customize my invite and vote buttons on top.gg

#

i have been digging through html

#

but havent got very far at all

cinder sandal
#

@late light css

earnest phoenix
#

how do you set a bot to do not disturb?

#

discord.js

cinder sandal
#

why would you put your bot to dnd

earnest phoenix
#

idk why not

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#
client.user.setStatus('dnd')

@swift umbra
do i put the with the bots activity?

#

whats the name for the phone icon when your on mobile?

#

@swift umbra

solemn latch
#

pretty sure thats undocumented.

grizzled raven
#

they can

#

it's not a status though

solemn latch
#

its still probably not a smart idea to use undocumented things.

tacit schooner
#

!help

solemn latch
#

no bot commands here

haughty bough
#

My bot no longer plays music. In the past I had the same problem and decided to put 1 << 25 in YTDL highWaterMark, but it seems that even this is not working anymore. Does anyone have any solution?

solemn latch
#

is it just not playing or are you getting a specific error?

earnest phoenix
#

@cinder sandal nice pfp

haughty bough
#

is it just not playing or are you getting a specific error?
@solemn latch Do not touch anything, without errors

earnest phoenix
#

Is your ytdl-core the latest version?

#

hey

#

Hey there

#

on how can I make the message send only on nsfw channels

#

Make a if statement check

#
if (<message>.channel.nsfw) // send message here```
haughty bough
#

Is your ytdl-core the latest version?
@earnest phoenix I updated and went back to work. Thanks!

chilly bison
#

pretty sure thats undocumented.
@solemn latch it's documented lol

solemn latch
#

offically?

#

or just someone found it out, so its "documented"

earnest phoenix
#

you have to modify your lib to get the mobile indicator

#

the client in the IDENTIFY payload to the websocket needs to be set to mobile

earnest phoenix
#

@earnest phoenix Did you see .NET core 5 dropped today?
@faint prism yeah i'm going to explore and fiddle with it over the weekend, it finally released

grizzled raven
#

would 2 open connections to a sqlite file be bad?

sudden pawn
#

who am i

earnest phoenix
#

yes @grizzled raven

#

however sqlite tries its best to be threadsafe

#

so when one connection does a query, the tables are locked and released once the query's finished iirc

#

which will result in, obviously, slower queries over multiple connections

#

sqlite3 handles concurrency very well though

#

so there shouldn't be anything noticable per se

#

msg.author.send(`\n> Byte Memory Usage: ${process.memoryUsage().heapUsed}\n> Bot Uptime:\n> Seconds: [${Math.floor(bot.uptime/1000)}]\n> Minutes: [${Math.floor(bot.uptime/1000/60)}]\n> Hours: [${Math.floor(bot.uptime/1000/60/60)}]\n> Days: [${Math.floor(bot.uptime/1000/60/60/24)}]`);

#

im not that good at math

#

how can i make it so

#

the number resets past 60/60/24/365

livid otter
#

shard.js not working discord. js 11.5.1

#

i cant update discord. js

earnest phoenix
#

well, you'll have to

#

domain change is occurring very soon

livid otter
#

commands do not work if i update

earnest phoenix
#

well, obviously

#

it's a major version update

#

there'll be breaking changes

#

could someone help me with the math

tardy dove
#

in discord.py 1.5.1, guild.members only returns one member

#

which is the bot itself

#

but there are definitely other users

solemn latch
#

are those members cached?

earnest phoenix
#

@solemn latch do u know how my problem can be fixed

tardy dove
#
    SERVER = bot.get_server(770731640682053663)
    for i in SERVER.members:
        print(i.name)
solemn latch
#

πŸ€·β€β™‚οΈ i might be able to in a minute

tardy dove
#

@solemn latch

#

im not sure

#

ignore get_server

sudden geyser
#

@tardy dove do you have intents enabled

tardy dove
#

no

#

how do i enable them?

#

@sudden geyser i set intents to default

#

still nothing

sudden geyser
#

Intents.defualt() enables everything except presence and member data.

tardy dove
#

still no dice however

sudden geyser
earnest phoenix
#

Bots will be kicked if they DM a user:
1. Join messages
2. Any type of automated message without consent
3. Any advertisements

#

whats wrong with join messages

sudden geyser
#

Then, when initializing the discord.Client class, pass a kwarg where intents is the key and the value is an instance of discord.Intents

#

valurim they're unwanted here.

earnest phoenix
#

wait

#

i thought that meant to like have an official bot

tardy dove
#

i turned on its ability to download the member list

#

but my side doesn't seem to see it

earnest phoenix
#

ive seen plenty of official bots have join messages

sudden geyser
#

Those rules are for this server

tardy dove
#

@earnest phoenix it means you cant have join messages here

sudden geyser
#

Your bot can still have join messages

#

they'll just be muted here

tardy dove
#

@sudden geyser so uh

#

i turned on every intent

#

do i have to wait or something?

sudden geyser
#

Try restarting your bot. Also can you show your code where you initialize your client

tardy dove
#
bot = commands.Bot(command_prefix="!!", intents= discord.Intents.default())
#

@sudden geyser

sudden geyser
#

Like I said, that enables everything except presence and member data I believe.

earnest phoenix
#

is it possible to insert my own functions into vsc

tardy dove
#

i have member data turned on through the dev portal

earnest phoenix
#

without making it in said code

tardy dove
#

but its still not working

earnest phoenix
#

and w/out module

solemn latch
#

as in an export?

earnest phoenix
#

uh

#

like

tardy dove
#

@sudden geyser does it generally take a few minutes for new intents to propagate or something

earnest phoenix
#

just make it appear

solemn latch
#

like, a function with the code in another file?

earnest phoenix
#

yeahh

solemn latch
#

yeah an export

earnest phoenix
#

but not requiring that file

solemn latch
#

oh

#

hmm