#development

1 messages Β· Page 1197 of 1

topaz saddle
#

could someone explain to me what :

message.mentions.users.first()

means? or what it does?

slender thistle
#

get first user mention in a message

topaz saddle
#

ah

#

ok

earnest phoenix
#

message.mentions means all the channels users bot and other stuff mentioned in the message

topaz saddle
#

ohh

earnest phoenix
#

.users means only the users mentioned in the messages

#

added unit test to me framework

topaz saddle
#

so when tagging someone in a message? mentioning someone else.

earnest phoenix
#

.first() means get the first user mentionwd in the message

topaz saddle
#

oh ty

earnest phoenix
#

note that DISCOED does NOT order mentions by the place they apoeared in the message

topaz saddle
#

oh okok

#

so not first tag , then second tag

sweet spade
#

internal/modules/cjs/loader.js:613 throw err; ^ Error: Cannot find module '/app/server.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) at Function.Module._load (internal/modules/cjs/loader.js:526:27) at Function.Module.runMain (internal/modules/cjs/loader.js:826:10) at internal/main/run_main_module.js:17:11
What I need to do I cant understand...

earnest phoenix
#

wherevere you have require('/app/server.js') change that to the right spot

#

because the file '/app/server.js' doesnt exist

#

try to do './app/server.js' instead

#

with the . to signify look in current directory

sweet spade
#

Permision denied it said

carmine summit
#

how do i get host of mongodb?

earnest phoenix
#

dont host mongodb externally

#

unless you know what your doing

#

just get a local instance

carmine summit
#

no, i dont know what im doing

#

just get a local instance
@earnest phoenix how

earnest phoenix
#

are you on a linux server

#

or windows machine

carmine summit
#

windows

earnest phoenix
#

sec

carmine summit
#

and im not planning to run this pc for 24/7

earnest phoenix
#

download this, it should auto start mongodb server on your machine

#

then you can access it with your code or the mongo script

carmine summit
#

does this require my pc to be on 24/7?

earnest phoenix
#

no, it will turn on/off automatically when you turn your pc on/off

carmine summit
#

i would like a to host it externally

earnest phoenix
#

why?

carmine summit
#

if that is the case

fluid basin
#
  1. where are you hosting your bot
  2. is there any reason why you can't use a database that is file-based(sqlite)
carmine summit
#

repl it

earnest phoenix
#

oh

#

that makes more sense

#

yea use a file based db

#

wasnt there a sqlite wrapper for bots that dumbed it down a ton @fluid basin ?

carmine summit
#

eh?

earnest phoenix
#

i think it was called easydb or whatever

fluid basin
#

I've never used repl.it for any bots, but as I know repl should keep your files that you created

carmine summit
#

how do i get mongo db host and port?

fluid basin
#

its quick.db

earnest phoenix
#

ye

fluid basin
#

also I do think repl supports sqlite

carmine summit
#

uh

fluid basin
#

if you insist on using mongodb, you need a server to keep the mongodb database running

carmine summit
#

uhhhhh

fluid basin
#

it is hard to set up locally (if you want to host it at home with a spare pc, port forwarding is required)

golden condor
#

just use atlas

fluid basin
#

and your bot on repl will stop working once your mongodb server stops working

earnest phoenix
#

isnt atlas paid though?

#

and considering hes using repl

#

yaknow

fluid basin
#

read how to start on using mongodb @carmine summit

golden condor
#

no you can have free clusters

carmine summit
#

brain go brrrrrr

split hazel
#

with student pack they also give you $200 credit no card or anything needed

#

fun if you wanna look at the paid or expensive clusters for free

earnest phoenix
#

or you can pay 5$ to have a vps + local mongo instance :^)

quartz kindle
#

or you can pay $3 for the same thing

pale vessel
#

what happened to your main

earnest phoenix
#

tim added unit testing to the framework

#

yee har

quartz kindle
#

yeah right

earnest phoenix
#

yee haw

#

tempted to add docker auto deployment into the travis script

#

now i can just copy paste that over to all my new api projects

#

moi bueno

quartz kindle
#

cool

shell lotus
#

How to add a megalodon bot ?

digital ibex
#

i prefer not to use atlas when working with mongodb

earnest phoenix
#

How to add a megalodon bot ?
@shell lotus find one

digital ibex
#

unless im working with 2 or more people, then i’d use it, but if im working in my own. just use localhost. dont have to pay for anything

earnest phoenix
#

why are people so fucking dunb

#

how does one be that dumb

wheat jolt
#

about d.js, when my bot gets disconnected by an admin while it's playing music, connection.play won't work next time it's used

#

is there any way to avoid this?

faint prism
#

why are people so fucking dunb
@earnest phoenix that's pretty rude

earnest phoenix
#

ik

#

but just...

#

like

digital ibex
#

haha

#

half of the people who talks in this channel r rude lmao

earnest phoenix
#

"Any idea why this doesn't work? shows the code"
"Because <smth>"
"What does that mean"
100% of the time <smth> is a REALLY basic thing of the programming language that everyone knows because it's common sense

opal plank
#

@digital ibex i'd disagree on that tbh, quite the opposite, most of us take time out of our schedules to help people, theres quite a small chunk of people who are obnoxiously rude towards new people unironically

zenith terrace
#

@wheat jolt maybe make a note to people saying to stop playing the music before disconnecting it

wheat jolt
#

I fixed it

digital ibex
#

i dont talk in this server much, but when i do, im talking in this channel and it seems like that to me lul. probably just me coming at the wrong time

wheat jolt
#

it was a typo and the bot didn't handle its disconnect correctly

digital ibex
#

wdym it didnt handle the disconnect correctly?

drifting wedge
#

wut is recomended for music?

#

and im using python

faint prism
#

"Any idea why this doesn't work? shows the code"
"Because <smth>"
"What does that mean"
100% of the time <smth> is a REALLY basic thing of the programming language that everyone knows because it's common sense
@earnest phoenix I mean, I agree completely with this. It's extremely common beginners come here and have basic questions about a language they don't even know the name of, which definitely can be frustrating lol. But I don't agree with attacking beginners by calling them ||fucking dumb||

sudden geyser
#

It's a lot more productive (and worth the time) to guide beginners to the resources they should use rather than shitting on them for their lack of knowledge. If they clearly don't want to accept those resources then that's their issue.

faint prism
#

Oh snap, does PM2 run more than just js apps?

pale vessel
#

yes

#

it's a process manager

faint prism
#

So I should be able to use dotnet myBot.dll

#

which spawns a child process iirc

dreamy cedar
#

anyone know how can i display emojis to represent badges?

opal plank
#

@faint prism you might be able to use nodemon fyi

earnest phoenix
#

im bore

sudden geyser
#

@dreamy cedar put a slash in front of an emoji (like this one: akariDance) to get its raw form and use that.

pale vessel
#

a backslash

opal plank
#

^^

faint prism
#

@faint prism you might be able to use nodemon fyi
@opal plank Just wanted to see if I can run different lang bots using pm2. I'll just stick with systemctl for now, thanks though

opal plank
queen geyser
#

hi, im speak spanish but, intent create my first bot
need help in this line "node bot.js" please, don't work

cinder patio
#

Looks like you are using the wrong quotes

earnest phoenix
#

@queen geyser regenerate the token then put it

cinder patio
#

Use " or '

topaz saddle
#

hello, ive been working on this for an hour now but it always gives result as my name instead of following the embed format.

cinder patio
#

snaeki, avatarURL is a function as far as I know

queen geyser
#

Use " or '
@cinder patio omg! TY!

topaz saddle
#

snaeki, avatarURL is a function as far as I know
ah

earnest phoenix
#

client.username

topaz saddle
#

i tried using client.username instead of user.username, but same results :-(

cinder patio
#

there's no such thing as client.username

topaz saddle
#

oh

#

huh

cinder patio
#

call avatarURL

#

avatarURL is a method, not a property

weak rain
earnest phoenix
#

1min leme give you my function

cinder patio
#

You don't have to give me anything. The solution is simple - call user.avatarURL. You are not calling the method

earnest phoenix
#

@topaz saddle try .setThumbnail(user.displayAvatarURL)

opal plank
#

method()

#

.property

cinder patio
#

That's also a function

topaz saddle
#

my brain is hurty

opal plank
#

displayAvatarURL is not a property on user

#

its a getter method

earnest phoenix
#

i used on user and work good

opal plank
#

avatarURL is a thing

#

displayAvatarURL isnt

#

displayAvatarURL() is a thing

#

avatarURL() isnt a thing (iirc)

pale vessel
#

it is

cinder patio
#

it is

pale vessel
#

it returns null on default avatars, unlike displayAvatarURL()

earnest phoenix
#

it returns undefined on default avatars, unlike displayAvatarURL()
@pale vessel thats what iam mean

#

and work 100%

queen geyser
#

oh ok, now.
I write "node bot.js" in the Bot Folder in cmd but he don't conect in Discord Server :c

queen geyser
#

:c

opal plank
#

are you logging in?

queen geyser
#

in discord web?

opal plank
#

no, in your code

queen geyser
#

idk

cinder patio
#

In older versions of discord.js, displayAvatarURL was a property, but in the version sneaki is using, it's a method

queen geyser
#

is my first bot xd

topaz saddle
#

feedeo, npm install discord.js?

faint prism
#

idk
@queen geyser You need to tell your bot to login to discord at some point in the code

opal plank
#

im assuming these older versions are deprecated now feud

cinder patio
#

yup, v11

opal plank
#

do @\instinct login on discord!

topaz saddle
#

and richembed is in older version?
as well

opal plank
#

jk, but you do neeed to connect it with your token as param(assuming its d.js)

topaz saddle
#

maybe idk

opal plank
#

both are deprecated

#

prob best to avoid v11 altogether

faint prism
#

jk, but you do neeed to connect it with your token as param(assuming its d.js)
@opal plank discord.io

queen geyser
#

feedeo, npm install discord.js?
@topaz saddle yep, is installed

topaz saddle
#

oh ok

opal plank
#

@faint prism read above

queen geyser
opal plank
#

wait what?

queen geyser
#

tutorial says :c

opal plank
queen geyser
#

sorry

#

getme code to install discord.js :c

#

pls

pale vessel
#

oh yikes

opal plank
#

did you construct your client?

#

YIKES

#

dont use that

queen geyser
#

lol

modest smelt
#

lol

opal plank
#

use d.js or some up to date lib fam

modest smelt
#

i literally woke up at 5AM

queen geyser
#

At this point I feel lost

earnest phoenix
#

.

queen geyser
#

u.u

opal plank
#

@earnest phoenix go dot elewhere

#

@queen geyser that discord.io that i've been looking at, if im not mistaken, is really outdated

queen geyser
#

ok i understand

earnest phoenix
#

?

opal plank
#

this is chat for development, not for dotting

faint prism
queen geyser
#

ty <3

topaz saddle
#

:)

queen geyser
#

im really new in this area :c

faint prism
#

np. Also, learn the programming language. It's called Javascript (JS). Understanding the syntax/grammer of the language will help you with a lot of issues

opal plank
#

we all start somewhere

#

was about to mention that as well

queen geyser
#

I just need discord.js or other dependence?

misty sigil
#

Depends

queen geyser
#

or does it depend on what i do?

opal plank
#

you shouldnt be doing a bot with little knownledge of a language, its what i usually say
you trying to write a russian essay without knowing russian.

#

bots are intermediate level projects

#

i'd suggest trying w3schools for a bit before hopping in

#

just so you get a general sense of JS

queen geyser
#

I understand technic english, logic and sintaxys of visual.net no more
and some english u.u

i studed programing 2 years but only visual.net

faint prism
#

ayyy dotnet

#

Do you mean Visual Basic, or another dotnet language?

opal plank
queen geyser
#

Visual basic hahahaa

faint prism
#

oof... that's rough

queen geyser
#

let's say my university was not very good

opal plank
#

is that enough knownledge to try a bot hands down tho? im not familiar with that so i cant say

faint prism
#

I really don't like the syntax in Basic

#

But it's good you have a general idea of OOP πŸ™‚

queen geyser
#

i create a minecraft launcher custom in visual basic 17 xd

#

but.. js idk

faint prism
#

Good news

#

You can make a bot in C#

opal plank
#

eeeey cache is working fine

queen geyser
#

I think that putting a challenge of this size forces me to understand the .js language, so I try to do my best

cinder patio
#

I don't think anything's stopping you from making a bot in Visual Basic

faint prism
#

JS is a pretty useful language to know

opal plank
#

scratch >

faint prism
#

I don't think anything's stopping you from making a bot in Visual Basic
@cinder patio that's true... but 🀒

queen geyser
#

ow.. can i create bot in visual basic?

#

D:

earnest phoenix
#

I don't think anything's stopping you from making a bot in Visual Basic
@cinder patio you cant do everything you wana

faint prism
#

ow.. can i create bot in visual basic?
@queen geyser Well it's just API calls if you don't have an available library

earnest phoenix
#

limited commands

cinder patio
#

It's entirely possible

queen geyser
#

I try to make my bot save presence data in discord, according to text and voice and then use that data in different ways such as role control for example

#

of course I don't know how to do any of that but I have faith haha

faint prism
#

How did you plan to approach the "saving" feature?

queen geyser
#

i have no idea c:

faint prism
#

Might need to learn how to communicate with a database management system as well then

queen geyser
#

totally

#

I am willing to learn everything

#

starting with a new tutorial that has updated libraries

sharp thicket
#

Hello,does anyone now how to react to the embed the bot sent after the user used a command?

misty sigil
#

message.channel.send(embed).then(m => m.react("😢"))

sharp thicket
#

i trien using .then but

misty sigil
#

thats correct use of .then

sharp thicket
#

yes ik to use then but i got other code

#
  message.react('πŸ‘').then(r => {
                            message.react('πŸ‘Ž');
                    });

                
                    message.awaitReactions((reaction, user) => user.id == message.author.id && (reaction.emoji.name == 'πŸ‘' || reaction.emoji.name == 'πŸ‘Ž'),
                            { max: 1, time: 30000 }).then(collected => {
                                    if (collected.first().emoji.name == 'πŸ‘') {
                                            message.channel.send(`text`)
                                            
                                    }
                                    else
                                            message.channel.send(`text`);
                            }).catch(() => {
                                    message.channel.send(`No Reaction after 30 seconds, command canceled!`)
                            });```
#

here is my other code e.e

misty sigil
#

that’s a reaction

#

not a message

sharp thicket
#

ok wait

#
    let target =   message.mentions.members.first() ||
      message.guild.members.cache.get(args[0]);
      
      if(!target) {
    return message.channel.send(`Please mention someone`)
}

        if(target.user.id == message.author.id){
return message.channel.send(`Hey ${message.author.username}  How would you do that please elaborate!`)
}

let embed9 = new discord.MessageEmbed()
      .setTitle("Text")
      .setDescription(`Hey ${target}, ${message.author}  Please react with  πŸ‘ or πŸ‘Ž`)
      .setColor('RANDOM')
      message.channel.send(embed9)



  message.react('πŸ‘').then(r => {
                            message.react('πŸ‘Ž');
                    });

                
                    message.awaitReactions((reaction, user) => user.id == message.author.id && (reaction.emoji.name == 'πŸ‘' || reaction.emoji.name == 'πŸ‘Ž'),
                            { max: 1, time: 30000 }).then(collected => {
                                    if (collected.first().emoji.name == 'πŸ‘') {
                                            message.channel.send(`text`)
                                            
                                    }
                                    else
                                            message.channel.send(`text`);
                            }).catch(() => {
                                    message.channel.send(`No Reaction after 30 seconds, command canceled!`)
                            });```
#

it has cuss words in it so i changed them

misty sigil
#

.then the message

#

not the reaction

sharp thicket
#

ok i'm too dumb

forest drift
#

how would i make it so a command in a module.exprot can change a variable called prefix thats already been defined by a var in index.js?

opal plank
#

also function on your var not on the message

#

if you react on message it'll react to the user who sent it

#

@forest drift attach it somewhere in your index

forest drift
#

so if it changes a variable, the command would have to be in the index instead of a module.export?

opal plank
#

on chat, message, whatever you want. since you're changing a reference, it'll change that variable value on all of them(since they are all referencing the same thing

#

no

forest drift
#

cause the variable is already defined in the index.js

opal plank
#
let a:number = 1;

client.on('message', (m:any) => { 
m.a = a;
runCommand(m);
})


//command file
runCommand(m:any) {
m.a = 0;
}

faint prism
#

how would i make it so a command in a module.exprot can change a variable called prefix thats already been defined by a var in index.js?
@forest drift if prefix is a global variable, you can read from .env
If it's guild specific, read from whatever datasource you're storing it at

opal plank
#

if you call that variable a now on your index, its 0

#

just reference it in a common object

forest drift
#

ok

faint prism
#

ghostping? lol

opal plank
#

i sent at the same time he sent the msg

#

since they were here, i deleted

#

unnecessary mention

#

or alternatively if you dont want to do that, just do this Jamie

forest drift
#

sorry, i didnt say anything cause i was tryuing to undserstand the code u sent

opal plank
#
let a:number = 1;

client.on('message', (m:any) => { 
runCommand(m,a);
})


//command file
runCommand(m:any,a:number) {
a = 0;
}
#

this is also doable

forest drift
#

ummm would this work:

acoustic bridge
#
embed.add_field(name="Image URL", value="[Click here to open](member.avatar_url)",inline=True)

Looking for a hyperlink message. although the "Click here to open" is not marked as a hyperlink

sudden geyser
#

That's because you're giving the url "member.avatar_url" instead of what should be the url

forest drift
#
const { prefix1, token1, botname1, boticon1 } = require('./config.json');

var prefix = prefix1;

At top of index

try {
        command.execute(message, args, boticon, prefix, botname);
        } catch (error) {
            console.error(error);
            };

Inside the client.on message function

module.exports = {
    name: 'help',
    description: 'Help Menu',
    execute(message, args, boticon, prefix, botname) {
    

inside the module export file

prefix = "g!";

The code to change the prefix within one of the commands in the module export file

sudden geyser
#

You could use f-strings and wrap member.avatar_url in {}

#

or use string concentration @acoustic bridge

acoustic bridge
#

Well it throws me an error with "invalid syntax" and "did you forget a comma?"

faint prism
#

Did you?

sudden geyser
#

show us what you wrote

opal plank
#

@forest drift if you doing custom prefixes per guild, i'd recommend going a different route though

acoustic bridge
#
embed.add_field(name="Image URL", value="[Click here to open](member.avatar_url)",inline=True)
misty sigil
#

Like a message event / db / cache interaction

acoustic bridge
#

here

faint prism
#

like a DBMS

sudden geyser
#

That is no different than your original one.

misty sigil
#

I wanna make a custom mongo wrapper

acoustic bridge
misty sigil
#

so it checks my thing

#

cache

acoustic bridge
#

Aight so wrapping it in a f string does that

sudden geyser
#

You don't have the () around the url for some reason

forest drift
#

i wasnt actualy changing the prifix, i was trying to test how i would change a variable in a module export file that would effect the index file thus affecting the other module export files @opal plank

acoustic bridge
#

Yea i just wanted to say... i missed that

opal plank
#

if its for that, then yeah that'd be fine

earnest phoenix
#

lmao

forest drift
#

but id doesnt work

opal plank
#

i'd still attach the variable to somewhere handy though

#

like message like i said

latent valley
#

Hey guy's

opal plank
#

try this

earnest phoenix
#

guy's?

#

what does a .dll file do

latent valley
#

What's up with everyone

faint prism
#

what does a .dll file do
@earnest phoenix It's a compiled binary

#

typically an extension for an executable binary (.exe)

latent valley
#

Anyone interested in trading on binary options and earning good profit dm for more info

faint prism
#

Anyone interested in trading on binary options and earning good profit dm for more info
@latent valley advert?

opal plank
#

not the server for this @latent valley

earnest phoenix
#

lol

opal plank
#

speaking of ads, the cache seems really stable now

#

2h uptime and no hiccups

misty sigil
#

Nice

faint prism
#

🎊

opal plank
#

*and somehow i havent been ratelimited for chunk caching 500 channels sweats *

earnest phoenix
#

LMAO

#

smh it made me go LMAOOOOOOOOOOOOOOOOOOO

opal plank
fluid basin
#

lol mongodb cache

#

virtually non existent

#

most people use redis on top of mongo

opal plank
#

redis >

#

redis and postgres for persistent data

pallid igloo
#
    let simplest = stringy.split('');

for (i = 0; i < stringy.length; i++){
    simplest = simplest.map(letter => {try{ `:regional_indicator_${letter.toLowerCase()}:` } catch (e) {message.reply('nu')}});
}

simplest.join('');```
Ehh, I'm evaling this and the bot is only spamming nu.
fluid basin
#

LOL

#

bruh moment

pallid igloo
#

Ree?

faint prism
#

Redis is a fast and efficient in-memory key-value store
Ooo fancy.
In C# I'd probably use use Dependency Injection to provide a class with a Dictionary property

opal plank
#

its basically a js map

dreamy cedar
#

how i use custim emojis in canvas

opal plank
#

but more complicated

fluid basin
#

custom emojis = images

#

so think that way

#

@pallid igloo why do you even need a try catch

dreamy cedar
#

custom emojis = images
@fluid basin ok thx

opal plank
#

silent logs

pale vessel
#
"go away".split("").map(x => x.match(/[a-z]/i) ? `:regional_indicator_${x.toLowerCase()}:` : x).join("")```thonk
static trench
#

does anyone use pycharm?

#

i am having trouble downloading packages

faint prism
#

auuu
@flint meadow ?

opal plank
#

so funny

faint prism
#

thanks @mint thicket ❀️

opal plank
mint thicket
#

Oh damn they did it here too

#

Ty

opal plank
#

indeed

static trench
faint prism
#

That quote was for the spam from Ural Aslan
Did you mean to quote me?

#

@static trench

static trench
#

oh sorry

faint prism
#

no worries, the link is dead now, but still scrolls up. I can see the confusion πŸ™‚

static trench
#

shivaco im sorry . i didnt mean to ping you 😦

queen geyser
#

πŸ‘ πŸ‘ πŸ‘

static trench
#

yayayay!

opal plank
#

aight if it survives this test i'll push it to the main branch

#

looking good thus far

faint prism
#

wolfram alpha's TOS says I can't cache responses 😭

opal plank
#

do they mention storing it?

#

storing =/= caching

faint prism
#

I mean, one is in memory, the other is not

opal plank
#

it said cache

#

cache is temporary

#

if you store it forever, it isnt cache, technically

earnest phoenix
faint prism
#

PROHIBITIONSYour API Client will not, and You will not, encourage or create functionality for Your users or other third parties to:
...
access, cache, store, retain or in any way compile any copies or portion of any Wolfram|Alpha content by any means other than as indicated in Your API Client;

opal plank
#

fuck

#

rip then

#

also good shit waft

faint prism
#

Also CACHING Unless part of a written agreement to the contrary, Your API Client is prohibited from caching Wolfram|Alpha content.

#

I don't want to cache anyways

opal plank
#

is it me or everyone accomplishing good things today? ||(the fact that i drank a lot last night might be the reason why im in a good mood and noticing those small things too)||

faint prism
#

I'd be careful associating alcohol that way, lol but that's #general

There was a privacy issue I had with wolfram api that surprised me

crimson fjord
#

can anyone help me in dms?

faint prism
#

why not here?

opal plank
#

is it anything fishy?

crimson fjord
#

cuz its the full bot code

opal plank
#

just use hastebin

#

Β―_(ツ)_/Β―

faint prism
opal plank
#

i literally sent you a link

crimson fjord
#

its a code for a music bot

opal plank
faint prism
#

is it anything fishy?
@opal plank It referenced my server's accurate location...

crimson fjord
#

isk whats wrong in it

faint prism
#

@crimson fjord use hastebin or ```

opal plank
#

click that link and paste your shit there

faint prism
#

isk whats wrong in it
@crimson fjord send error msg

opal plank
#

dont spam channel

faint prism
#

dont spam channel
@opal plank idk if i'd consider a single huge msg spam. But it's unsightly for sure

crimson fjord
#

its not working

#

idk why

opal plank
#

too big even without spaces

#

Β―_(ツ)_/Β―

#

@crimson fjord do you use VSC?

crimson fjord
#

yes

opal plank
#

try that

crimson fjord
#

i have that

#

i used that

opal plank
#

you clearly dont

#

step debugging shows your code running real time

#

so you can catch where the error is

#

i much rather teach you how to debug properly, if that doesnt work i'll help you fix ur code

crimson fjord
#

umm k

#

when i run the bot it comes online on discord buth nothing happens

faint prism
#

when i run the bot it comes online on discord buth nothing happens
@crimson fjord Well, what did you program it to do next?
It's only going to do what you tell it to do (I didn't read code)

opal plank
#

im so confused about this code tbh

#

switch on a single case

#

function without parentesis

crimson fjord
#

@crimson fjord Well, what did you program it to do next?
It's only going to do what you tell it to do
@faint prism its a music bot i tried to make one

#

i only made the !play command

#

but dosent work

opal plank
#

yikes

#

copied code

crimson fjord
#

i watched a tutorial on yt

opal plank
#

bad

crimson fjord
#

i am just trying

#

my first bot

opal plank
#

use docs, youtube videos are bad for learning

crimson fjord
#

oo

opal plank
#

use the proper documentation

#

first bot or first attempt at javascript?

crimson fjord
#

actually both

misty sigil
#

bad

faint prism
#

Wait, did he copy code that had comments below saying why it didn't work..?

opal plank
#

as much as its annoying yo hear this, you need to learn the lΓ§anguage before using it

#

as i say, you trying to write a russian essay without knowing russian

crimson fjord
#

hmmmmmm

opal plank
#

i'd highly encourage you to give a go on this

misty sigil
#

MDN too

opal plank
#

^^

faint prism
#

Or design a building without taking classes in architecture. It isn't going to work well

misty sigil
#

or eating food without teeth

opal plank
#

MDN is a bit harder for begginers imo, so i'd still recommend w3schools cuz of their interactive snippets that you can try

modest smelt
#

when will we know if our bot is done?

earnest phoenix
#

@modest smelt @luca will dm u

#

@gilded plank

eternal echo
#

guys

#

i need a developer badge

#

πŸ™„

slender thistle
#

-verifybot

gilded plankBOT
#

Hi! It seems like you are looking for information on how to get your bot verified.

Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.

If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.

We cannot provide support on how to get your bot verified.

topaz saddle
#

its been a couple hours now, and i still can't find a way to make it so that if the user tag is mentioned, then it gives the avatar of the user tagged, but if there is no tag - it gives the avatar of the msg author.

#

there are many tutorials online, but all of them have embed, and i have no idea how embed works at the moment.

sudden geyser
#

You should check if user exists before you try sending it.

sonic lodge
#

use || to revert to the message author if that'st he case

sudden geyser
#

For example: ```js
let user = ...

if (!user) {
user = msg.author
}

// now send it```

topaz saddle
#

ah @sonic lodge i did try that, but it wasnt working. i will put it back to that but because i thought that was the reason it didnt work but now i know

#

For example: ```js
let user = ...

if (!user) {
user = msg.author
}

// now send it```
tysm

thin turret
#
const fetchedLogs = await message.guild.fetchAuditLogs({
   limit: 1,
   type: ''
})
``` Im trying to get the member that invited the bot inside `guildCreate` Event
sonic lodge
#

what did you try previously

thin turret
#

What Do I pass in for type?

sudden geyser
#

I think it's BOT_ADD

thin turret
#

Epic ill try that

topaz saddle
#

oops

sonic lodge
#

that should be fine

topaz saddle
#

var user = msg.mentions.user.first() || msg.author;

pale vessel
#

users

topaz saddle
#

oh ok

earnest phoenix
#

i have a question why its showes like that?

#

what's the url to the image

#

https://immh-savage.is-inside.me/7EIEab6C.png

#

:D

#

ahh not that

#

wait ill send

#

this

#

the hell

slender thistle
earnest phoenix
#

dbl's old domain

#

^^

#

why does that still exist

#

it's probably because the bot isn't verified yet @earnest phoenix

#

ahh yeah okey thanks

#

the hell

earnest phoenix
#

wrong

#

f

slender thistle
#

Yup

#

it's probably because the bot isn't verified yet
this would be correct

earnest phoenix
#

Should I use this format of storing user data in mongodb collections?

{
    hasInteractedWithTheBot: Boolean,
    hasInteractedWithGuilds: Array
    balance: Number,
    inventory: {
        protectionItems: {
            padlock: Number,
            lifesaver: Number,
            landmine: Number
        }
    },
    profile: {
        embedCollarColor: String,
        description: String,
        badges: Array
    },
    hype: [
        {
            guildID: String,
            level: Number,
            xp: Number
        }
    ]
}
#

is Snowflake an actual class

sonic lodge
#

snowflakes are just strings iirc

earnest phoenix
#

it's a thing in Discord so I guess it is a class in discord.js too

#

oh ko

#

*ok

#

wtf

digital ibex
#

the hasInteractionsWithBot seems redundant and inefficient in this case @earnest phoenix

#

what is hasInteractionsWithGuilds ?

sharp thicket
#

hi is there an event so the bot looks when its added to a server im using discord.js.

earnest phoenix
#

Is there a reason and/or fix to why my bot takes so damn long to login?

#

hi is there an event so the bot looks when its added to a server im using discord.js.
@sharp thicket guildCreate

digital ibex
#

why r u channel hopping @sharp thicket

sharp thicket
#

im not..

digital ibex
#

i’ve answered u already

sharp thicket
#

what

#

its my first time asking this question

misty sigil
#

hi is there an event so the bot looks when its added to a server im using discord.js.
@sharp thicket guildCreate

#

You were already awnser Ed

sharp thicket
#

what where?

digital ibex
misty sigil
#

@sharp thicket guildCreate

sharp thicket
#

yes ik

#

i didn't ask again..

#

i'm so confused en..

#

rn*

topaz saddle
#

hi so confused en.. , im sneaki.

earnest phoenix
#

@slender thistle

#

@oak cliff

slender thistle
#

@queen jetty Why did you post that token

earnest phoenix
#

maybe it was an accident

fringe axle
#
.setImage(`https://api.alexflipnote.dev/floor?image=${member.user.displayAvatarURL()}&text=${ftext}`)
``` But in my code it won't load...
earnest phoenix
#

o

fringe axle
#

Now it's working! I fixed it.

still merlin
#

My websites broken- I made a div with \n and <code> tags, And my command list is all crammed together, No code tags, And is in the navigate bar https://pastebin.com/tW2Mq2aS

restive furnace
#

Fun fact: HTML: New line <br> Any other language: New line \n

#

@still merlin ^^^

still merlin
#

Oh thanks!

restive furnace
#

np

still merlin
#

but how do I take the text from the navigation bar?-

restive furnace
#

by using different divs 🀷

drifting wedge
#

what options do i have for a python heroku music bot?

#

please please ping me

restive furnace
#

1 only: buy a vps

earnest phoenix
#

@drifting wedge wtf i dint understand ur english

#

pyrhon heroku ?

still merlin
#

by using different divs 🀷
@restive furnace I did

drifting wedge
#

pyrhon heroku ?
@earnest phoenix im using discord py, on heroku

earnest phoenix
#

ye

#

and

#

heroku

#

???

misty sigil
#

don’t use heroku

#

for music

earnest phoenix
#

then buy a vps

drifting wedge
#

for music
@misty sigil i mean can i?

#

i know it sucks

misty sigil
#

yes but don’t

#

it’s shit

earnest phoenix
#

or aws or gcp if u dont have money

drifting wedge
#

even if its laggy

#

its a temp thing

earnest phoenix
#

laggy cuz ur bandwitch

misty sigil
lime pumice
#

or aws or gcp if u dont have money
@earnest phoenix Aws is paid

drifting wedge
#

it’s so shit for music that you could put it in #memes-and-media
@misty sigil IS IT POSSIBLE

#

like can i

misty sigil
#

YES MOTHER FUCKER

earnest phoenix
#

but u have 300€ free for first time ??

misty sigil
#

GO AHEAD AND DO IT

#

I BELIEVE IN YOU

lime pumice
#

but u have 300€ free for first time ??
@earnest phoenix is that so?

earnest phoenix
#

Idk

restive furnace
#

yes

earnest phoenix
#

didnt check

lime pumice
#

Oh*

restive furnace
#

300€ for gcp, aws & azure too

earnest phoenix
#

oh ye

#

but azure u need studen card ?

lime pumice
#

Yea

restive furnace
#

or cc

#

(credit card)

#

you get 100€ if u have student priviledges in azure

trim saddle
#

@low wasp bitch help me

low wasp
#

aaaa?

trim saddle
#

prefixes in my command handler machine borked

#
let prefix: string
this.prefixes.forEach((p) => {
    //if (!this.prefixes.includes(p)) return
    if (msg.content.toLowerCase().startsWith(p)) prefix = p

})
if (!prefix) return

for some reason this doesn't work on prefixes with spaces

still merlin
#

My website is screwed up, I'm using a different div and still my cmdList div is getting mixed up

trim saddle
#

you have everything in the navbar div

still merlin
#

I do, Agrh

trim saddle
#

@low wasp b et ch

low wasp
#

OI u got me killed

trim saddle
#

too badums

#

use a playing status next time

drifting wedge
#

is youtube api or spotify api better

restive furnace
#

spotify cant "stream"

#

so youtube in my opinion

faint prism
#

For what, music? Spotify only gives info on songs, playlists, (and maybe 30-second clips)

opal plank
#

you could scrape it

restive furnace
#

doesnt some bots really scrape it?

opal plank
#

yes, and likely really against their tos

fringe axle
#

For what, music? Spotify only gives info on songs, playlists, (and maybe 30-second clips)
@faint prism howβ€˜s this called exactly? (The package)

restive furnace
fringe axle
#

Okay, thanks.

#

Hm. Any npm package for it?

sudden geyser
opal plank
#

is there an easy way to clear a map?

sudden geyser
#

.clear()?

opal plank
#

map.clear() ?

sudden geyser
#

yeah try

opal plank
#

lets see

shy hill
#

Wassup

sudden geyser
#

hi

opal plank
#

oh yeah that works

#

ty lite

still merlin
#

How would I use a button onclick stuff in this case thing here html <a href=""> Command List </a>, I tried adding a onclick after the href but that gave me a billion errors

fringe axle
#

Itβ€˜s onclick automatically for me

dawn plaza
#

How do I define MessageEmbed?
I tried this:

const { Client, MessageEmbed } = require('discord.js');
misty sigil
#

it’s defined

karmic compass
#

if anyone knows discord.py very well,

i want to do something like this in discord.js```javascript
client.on('message', async function(message) {
if(message.author.bot || !message.content.startsWith(prefix)) return
if(message.channel.type == "dm") return message.reply('You can't use me in DMs!')
const args = message.content.slice(prefix.length).split(/ +/)
const command = args.shift().toLowerCase()

if(command === "help") {
//Other Things
}
})

still merlin
#

Learn to code in python

dawn plaza
#
ReferenceError: MessageEmbed is not defined
    at Object.execute (C:\Users\maxh5\Desktop\Bot\commands\help.js:5:19)
    at Client.<anonymous> (C:\Users\maxh5\Desktop\Bot\main.js:43:34)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (C:\Users\maxh5\Desktop\Bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\maxh5\Desktop\Bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\maxh5\Desktop\Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\maxh5\Desktop\Bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\maxh5\Desktop\Bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\maxh5\Desktop\Bot\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:315:20)

@misty sigil

sonic lodge
#

do you have the require in that file

faint prism
#

Looks like you could have imported it wrong. Any time I've ever used MessageEmbed was by creating a new MessageEmbed object

drifting wedge
#

using discord py, heroku and ffmpeg/youtube_dl, how can i set it up?

#

i have all the code

#

and it works on my pc

restive furnace
#

dont copy paste ok

faint prism
#

It sounds like you're making a youtubeDL bot lol

restive furnace
#

lavalink is easiest for newbies

#

but not possible in heroku

misty sigil
#

lava link is cool from what I’ve heard

drifting wedge
#

well i have all the code

#

already

#

for ffmpeg

faint prism
#

That'd be an interesting (illegal and unethical) bot to design.
Imagine typing !getsong Yellow submarine Beatles and it responds with a mp3 file upload

restive furnace
#

"i have all the code, already, for ffmpeg" sounds like copy pasting, but okay.

misty sigil
#

That'd be an interesting (and unethical) bot to design.
Imagine typing !getsong Yellow submarine Beatles and it responds with a mp3 file upload
@faint prism lmao that’s EpIcℒ️

restive furnace
#

^^ unique idea

faint prism
#

It's definitely against copywrite laws

dawn plaza
#

Is this right?

const embed = new MessageEmbed()
    .setTitle('x');
    message.channel.send(embed);
misty sigil
#

Yes

faint prism
#

lgtm

dawn plaza
#

When I do it it says MessageEmbed is not defined.

faint prism
#

Then it isn't imported correctly

#

Where you do the require() part must be incorrect

dawn plaza
#
const MessageEmbed = require('discord.js');
#

Would this work?

faint prism
#

I don't think so

paper phoenix
#
const { MessageEmbed } = require('discord.js');

@dawn plaza

faint prism
#

^ that looks right

#

but make sure you aren't replacing the client bit, you need that or else you'll get client is not defined

sand skiff
#

Hi, i need help

#

i dint know what commands to add to my bot

faint prism
#

So you need ideas?

solemn leaf
#

can

faint prism
#

look up random APIs on the internet, and make a bot that lets users interact with them

solemn leaf
#

someone tell me why these are different

faint prism
#

I did that for a Wolfram Alpha API and made a bot

misty sigil
#

The discord api

#

That’s users β€” not guilds @solemn leaf.

solemn leaf
#

yeah Ik

#

Im doing

misty sigil
#

bot.guilds.cache.size

faint prism
#

the cached users size != whatever the other users value is

solemn leaf
#
let info = 0
    bot.guilds.cache.forEach((guild) => {
        info = info + guild.memberCount
    })
#

this is for my member could

#

I tried bot.users.cache.size to see if it worked

#

and it gave me a number 300 off

faint prism
#

Then your cache doesn't include all the users unless you download all of them

#

D API doesn't cache offline users in large guilds unless you tell it to

#

iirc

solemn leaf
#

ahhh

#

so imma stick to this method of getting my member count

#

thanks

#

wait

#

can I do

#

a!eval bot.presence.status = "idle"

#

to change my bots status?

faint prism
#

try it and see

solemn leaf
#

it didnt works lmao

slender thistle
#

because it's not an HTTP request

#

You're simply changing a property locally

faint prism
#

setStatus maybe, if that's a thing

slender thistle
#

or setPresence

solemn leaf
#

nah

#

bot.presence.setStatus = "dnd"

slender thistle
#

A function

#

Use it as a function

solemn leaf
#

bot.user.setStatus(dnd')

restive furnace
#

<clientUser>#setPresence(obj)

#

<client>#editStatus(obj) for eris

solemn leaf
#

yeah

#

that worked

faint prism
#

Kinda want to start making a bunch of single-purpose bots that just interact with some API

solemn leaf
#

I was gonna do that

#

I was gonna make lots of google api bots

faint prism
#

Why google specifically?

restive furnace
#

there are more APIs than googles too

solemn leaf
#

ik

#

I was gonna do like a google api got

#

with google maps and other stuff

queen geyser
#

:')

faint prism
#

with google maps and other stuff
@solemn leaf Would you return a link to g maps or a screenshot?

solemn leaf
#

idk

#

I was actually gonna help my friend with his bot

faint prism
#

I'd imagine a link would work better

solemn leaf
#

it looks like this

faint prism
#

I was actually gonna help my friend with his bot
@solemn leaf You all using git-scm?

#

interesting!

solemn leaf
#

really lmao

#

we havent worked on it in months

faint prism
#

Is that actually a screenshot of a running application?

solemn leaf
#

yes

queen geyser
#

I learned a lot these last hours: ')

web interface + dbsql + npm + node.js + .js + discord.js documetnation

solemn leaf
#

it takes a screen shot

#

then setups controls and info from the application

#

and sends it to discord

#

commands are the commands in the game

faint prism
#

That's a really cool idea. Pretty high resource overhead for multiple games though

solemn leaf
#

its only one

faint prism
#

that's what i figured

solemn leaf
#

wait

#

Nintendo gonna strike us

#

hmm

#

eh

dawn plaza
#

Can someone send me a link to a Embed guide? I can't get it to work for some reason and I've tried a few guides already

solemn leaf
#

I dont care lmao

#

@dawn plaza what lang

dawn plaza
#

.js

faint prism
#

Can someone send me a link to a Embed guide? I can't get it to work for some reason and I've tried a few guides already
@dawn plaza did you try the library docs?

restive furnace
#
faint prism
solemn leaf
#

@dawn plaza console.log(Discord.version)

dawn plaza
#

Those are the two I tried^

solemn leaf
#

console.log(Discord.version)

faint prism
#

I used it yday and it works for me

dawn plaza
#

I'm using a command handler, could it be that?

solemn leaf
#

you need guides

#

yessss

faint prism
#

Straight outta the docs

const exampleEmbed = new Discord.MessageEmbed()
    .setTitle('Some title')
channel.send(exampleEmbed); // or msg.reply(embed)
solemn leaf
#

:big_brain:

#

my brain kinda messed up

#

as ou can tell in my pfp

#

why would you reply

#

with it

#

it would be like

#

@faint prism

embed
faint prism
#

you can reply with an embed

solemn leaf
#

ik

#

but why

faint prism
#

as a command response?

drifting wedge
#

i coded ffmpeg for discord py

#

like music bot

dawn plaza
#

@faint prism I did exactly that and this is what I got

solemn leaf
#

wh

dawn plaza
drifting wedge
#

why wouldnt it work with heroku

#

it works on my pc

misty sigil
#

Define discord

solemn leaf
#

you didnt require discord

#

lMAOO

misty sigil
#

figure it out yourself

faint prism
#

@solemn leaf Here is an example of msg.reply(someEmbed)

var embed = new Discord.MessageEmbed()
          .setTitle('Wolfram Alpha')
          .addField('Question', query)
          .addField('Simple Answer', data)
          .setFooter('Requested by: ' + usr);

        msg.reply(embed);
solemn leaf
#

wwait

#

it doesnt ping?

dawn plaza
#
const Discord = require('discord.js');

I already had this?

#

I assumed this was it

misty sigil
#

That’s it

solemn leaf
#

const Discord = require("discord.js");

#

yeah

faint prism
#

it doesnt ping?
@solemn leaf no, it matches the msg's context (channel or DM)

solemn leaf
#

dam

#

ther moment

#

when crab rave starts randomly playing on your spotify track

dawn plaza
#

Okay, so if I'm getting told Discord isn't defined but I'm already defining Discord, what the heck do I do?

solemn leaf
#

can I make an image a link

dawn plaza
#

I have the embed command in a separate file btw

solemn leaf
#

ik

#

what a command handler is

misty sigil
#

I have the embed command in a separate file btw
@dawn plaza it needs to be defined in there too

solemn leaf
#

unless if you pass discord though the anysc

opal plank
#

or dont use embed builder

misty sigil
solemn leaf
#

can I make an image a link>

opal plank
#

erm lemme check

#

i know author you can

#

but i think image also doable

restive furnace
#

that image is from spotify api btw

opal plank
#

hmmm

restive furnace
#

with the builder u can put attachement iirc

earnest phoenix
#

i think spotify api make my brain explose

opal plank
#

you can put the attachment without the builder regardless

earnest phoenix
#

or maybe the dev use canvas ._?

#

so he need to write 100+ lines of code

#

for a pic

#

LoL

solemn leaf
#

not?

faint prism
#

when you send an embed, you can get the msg's image link from it on the discord's server

solemn leaf
#

@earnest phoenix its not 100 lines it is 108

earnest phoenix
#

wtf

#

i said 100+

opal plank
#
let embed = { embed : {  description: 'hi' }}
<channel>.send(embed);

//equals to
<chanel>.send({ embed : {  description: 'hi' }});

//which also equals to
let embed = new Discord.MessageEmbed().setDescription('hi');
<channel>.send(embed);

in the end they are all EXACTLY the same , but using embed builders just use more resources unecessarily

earnest phoenix
#

i didnt said 100

#

wait

opal plank
#
<chanel>.send({ embed : {  description: 'hi' }});```
#

this is better

earnest phoenix
#
<chanel>.send({ embed : {  description: 'hi' }});
opal plank
#

cuz you are declaring less variables

earnest phoenix
#

we dont have to require it ?

#

WHAT

opal plank
#

of course not

earnest phoenix
#

i am dumb

opal plank
#

imagine reading the docs

earnest phoenix
#

with that i can make my bot faster

#

omg

opal plank
#

thats why i said embed builders are trash

#

calling constructor (new), creating variables, calling methods, then sending

#

rather than

#

send()

#

embed builder is stupid imo

opal plank
#

wanna see for yourself?
do an embed builder and then before sending, do console.log(embed)

#

you'll see its the exactly same object i mentioned above

#

@solemn leaf if you got something against my pfp you're more than welcome to go to #memes-and-media rather than tash talking me here while im explainging something

cinder patio
#

Use whatever you like both methods work

faint prism
#

That pfp gives me dopamine. Thanks

earnest phoenix
#

should i learn CSharp or CHastag or C#

restive furnace
#

if u want

#

C#9 is TSish

#

since top-level code allowed

misty sigil
#

C++ fact of the day
C++ spaghetti was used to make tf2

restive furnace
#

C++ was used to make billions of games - before unity

#

well, still AAA Game Companies use C++ tho

#

and also, C++ is only spaghetti, if the developer is bad

drifting wedge
#

wuts the best image thing?

#

PILLOW?

earnest phoenix
#

pillows are cool

sand condor
#

yes

grand oyster
#

Does anyone know how crosspost work? I have an announcement channel with multiple crossposted messages and channels that follow it don't really show anything nothing

#

Bot is sending out embed messages and then cross post them

misty sigil
#

you need to publish them

dawn plaza
#

How do you get who requested a command?

misty sigil
#

message.author.tag

#

lma o

dawn plaza
#

thx

earnest phoenix
#

message.author.tag
@misty sigil .username ????

grand oyster
#

my bot did publish messages it seems it's called crosspost in the API

misty sigil
#

.username is mattthew, .tag is mattthew#0001

earnest phoenix
#

or maybe
<@!${message.author.id}> == @earnest phoenix

misty sigil
#

no.

earnest phoenix
#

yes

misty sigil
#

not in a footer

restive furnace
#

@grand oyster if your lib supports it, there should be option while sending message

misty sigil
#

where most requested by: notes are

grand oyster
#

yeah I already did that it's published in the announcement channel but its following channels don't show any messages

faint prism
#

is tag = username + '#' + discriminator ?

slender thistle
#

Essentially

drifting wedge
#

Command raised an exception: OSError: cannot open resource

#

error

#

u want code?
using discord py

#

and pillow

still merlin
#

does anyone know how you open the mail app to send a email or something in html? mailto: <email>?

modest smelt
#

hey guys!

restive furnace
#

@still merlin href="mailto:email" iirc

still merlin
#

Thanks a lot!

drifting wedge
#
async def info(ctx, user: discord.Member):
    img = Image.open("infoimgimg.png") #Replace infoimgimg.png with your background image.
    draw = ImageDraw.Draw(img)
    font = ImageFont.truetype("Modern_Sans_Light.otf", 100) #Make sure you insert a valid font from your folder.
    fontbig = ImageFont.truetype("Fitamint Script.ttf", 400) #Make sure you insert a valid font from your folder.
    #    (x,y)::↓ ↓ ↓ (text)::↓ ↓     (r,g,b)::↓ ↓ ↓
    draw.text((200, 0), "Information:", (255, 255, 255), font=fontbig) #draws Information
    draw.text((50, 500), "Username: {}".format(user.name), (255, 255, 255), font=font) #draws the Username of the user
    draw.text((50, 700), "ID:  {}".format(user.id), (255, 255, 255), font=font) #draws the user ID
    draw.text((50, 900), "User Status:{}".format(user.status), (255, 255, 255), font=font) #draws the user status
    draw.text((50, 1100), "Account created: {}".format(user.created_at), (255, 255, 255), font=font) #When the account was created
    draw.text((50, 1300), "Nickname:{}".format(user.display_name), (255, 255, 255), font=font) # Nickname of the user
    draw.text((50, 1500), "Users' Top Role:{}".format(user.top_role), (255, 255, 255), font=font) #draws the top rome
    draw.text((50, 1700), "User Joined:{}".format(user.joined_at), (255, 255, 255), font=font) #draws info about when the user joined
    img.save('infoimg2.png') #Change infoimg2.png if needed.
    await client.upload("infoimg2.png")```
#

thats my code

#

i got it off githuv

#

but it saying cant open recousce

#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: OSError: cannot open resource

still merlin
#

Don't copy and paste code. Simple

drifting wedge
#

i want to understand it

#

i wont use this is my bot

#

but i couldnt find any videos

#

so can anyone help me cuz its not opening it

still merlin
#

Don't use video tutorials & Don't copy and paste of github, Write down what you need

restive furnace
#

gooooooooooogle it

#

google is programmers paradiseβ„’

drifting wedge
#

i did dummy

still merlin
#

And learn the langue before you try and make a bot

restive furnace
#

^^^^^^

still merlin
#

Don't come and insult us, Its your fault for copy and pasting without knowing how to code

restive furnace
#

yeah find snippets (if ur lazy) or explanations, and build the command from that information.

still merlin
#

^^^^

restive furnace
#

i did dummy
un-needed insult

rich trail
#

Hi guys. I want to be Bot Developer. What I can?

sand condor
#

??

faint prism
#

πŸ™‚

sand condor
#

the role or actually develop bots

rich trail
#

Oh! I am sorry

#

I want to be Bot Developer role

faint prism
torpid tiger
#

How can Δ± read the badgets in js v12

misty sigil
#

<user>.flags iirc

torpid tiger
#

Thx

earnest phoenix
#

Hello guys how do I add my bot to the top gg site??

#

why i cant play the audio of the "createStream"?

slender thistle
#

@still merlin @restive furnace if neither of you are willing to point them in the right direction, please refrain from using this channel

#

There was two of you, and neither of you bothered to actually help them solve the issue.

opal plank
#

i was bored

#

and then found out i was right, ish

#

definetly need a fuckton to make a difference, thats 1 mil iterations

#

but indeed sending payload without declaring it is the most performant

solemn leaf
#

how

#

can I get this to say what the custom status is

misty sigil
#

user.presences.activity[0] iirc

solemn leaf
#

yeah

#

but that returns that

#

let n = user.presence.activities.find(a => a.name === 'CUSTOM STATUS')

#

can I do that?

opal plank
#

that'll error iirc

solemn leaf
#

I do it for my spotify commands

opal plank
#

also pls start using parenthesis

#

function something something

#

function (params) {} code

solemn leaf
#

let n = user.presence.activities.find((a) => a.name === 'CUSTOM STATUS')

opal plank
#

arrow function is a function

#

still error though

#

cuz presence isnt always there

#

do conditional chaining if your node is high enough

solemn leaf
#

that is why there is a if before it

opal plank
#

which you didnt show

#

so how was i suppose to know

#

anyhow

#

if it is there i think that might work

#

give it a try

solemn leaf
#

n is undefined

opal plank
#

then define it

#

i dont think i can go any further without abusing rate limits

#

shit

solemn leaf
#

I did

opal plank
#

if u did it would not have error'd

solemn leaf
#

Erwin

opal plank
#

das me

solemn leaf
#

@opal plank got it

opal plank
#

noice

solemn leaf
#

so

#

n.state?

opal plank
#

huh?

solemn leaf
#

to get the text

opal plank
#

what is n?

faint prism
#

tfw your eval is lookin pretty nice

solemn leaf
#

n

#

would be