#development

1 messages · Page 1478 of 1

lament rock
#

Which did you remove

slow violet
#

te 2nd one

#

so now its like this

#

client.on("ready", () =>{ console.log(Logged in as ${client.user.tag}!`);
client.user.setPresence({
status: "idle", // You can show online, idle... Do not disturb is dnd
game: {
name: "Into The Light", // The message shown
type: "LISTENING" // PLAYING, WATCHING, LISTENING, STREAMING,
}
});
});

`

lament rock
#

Isn't the game property deprecated

thin apex
#

look at the docs

slow violet
#

i did and i ran some commands from it

lament rock
slow violet
#

and the console log say error

#

and the command stops running

lament rock
#

only accepts activity not game

thin apex
#

yeah

slow violet
#

well idk i use a website to run my codes

#

because i have a chromebook

thin apex
slow violet
#

and i cant run any codes on the chromebook

thin apex
#
client.on("ready", () =>{
    console.log(`Logged in as ${client.user.tag}!);
    client.user.setPresence({
        status: "idle",  // You can show online, idle... Do not disturb is dnd
        activity: {
            name: "Into The Light",  // The message shown
            type: "LISTENING" // PLAYING, WATCHING, LISTENING, STREAMING,
        }
    });
 });

#

there

#

do that

slow violet
#

ok

thin apex
#

activity, not game

arctic hare
#

if you make it streaming you may need to provide a link

thin apex
#

game is deprecated

thin apex
#

but they want listening

slow violet
#

mmmmmm well it

#

said error

thin apex
#

@slow violet

#

thats not me lol

#

you forgot a `

#

line 210

slow violet
#

ah

arctic hare
#

syntax error

slow violet
#

lol

thin apex
#

lol i didnt make the mistake

slow violet
#

lol ok

drowsy epoch
#

Tysm

thin apex
#

did that work?

slow violet
#

wait u said line 210

thin apex
#

whoops

#

219

#

sry

slow violet
#

ok

#

it ok

thin apex
#

did it work?

slow violet
#

wait weher do i put the a' lol

thin apex
#

line 219

#

right before "Logged"

slow violet
#

ok

thin apex
#

right after ```js
console.log(

#
console.log(`

^

slow violet
#

ok

thin apex
#

|| ||

slow violet
#

well this happened

bleak spire
#

can someone help me with make a bot

slow violet
#

dont worry u can use

arctic hare
slow violet
#

thats what i use

bleak spire
#

ok

slow violet
bleak spire
#

but when i make a music bot its works but we cant hear it

arctic hare
slow violet
#

make sure u dont have it muted lol

bleak spire
#

no isnt muted

slow violet
#

oh

#

is it playing a song

#

or not

bleak spire
#

yup its playing

#

but cant hear it

thin apex
#

Wait wtf

slow violet
#

oh

slow violet
thin apex
#

Where

arctic hare
#

Learn how to code-

outer niche
#

https://pastebin.com/UVCwc0jK

Inside that link I have posted I have my HTML code I'm simply just trying to get text in the middle of the image

#

echo bot

slow violet
#

i use node.js

outer niche
#

Look right above it that one should make it center

slow violet
solemn latch
#

you should really not be using glitch for hosting bots

slow violet
#

its really good

#

there active 24/7

#

for free

rustic nova
#

Uptime bots are against glitch tos

#

Good job on violating glitch tos

solemn latch
#

^ unless your paying, bots on glitch are pretty much against tos, since uptime robot is against glitch tos.
if you are paying, glitch is too expensive.

#

yeah, repl is ok

#

but glitch, like we where talking about its not ok.

#

I belive so yeah.

#

You can with uptime robot

#

Which they allow and seemingly openly support.

#

Or Google f1 micros are a really good free choice.

#

No shady uptime robot stuff

#

Yeah

lilac ferry
#

Hi, this event doesnt work, it doesnt dump the server ID in the json, how can I fix this, thanks, famous8

#
@bot.event
async def on_guild_join(guild):

    with open('.//cogs//prefixes.json', 'r') as f:
      prefixes = json.load(f)
      prefixes[str(guild.id)] = '--'
      prefixes.append
    with open('.//cogs//prefixes.json', 'w') as f:
      json.dump(prefixes, f, indent=4)

sudden geyser
#

Why do you have two slashes in the file path?

gilded olive
#

If youre going to use 2 slashes make it a raw string

#

r'string'

earnest phoenix
#

hello

#

how to make

#

votes rewards

#

i need to use this?

crimson vapor
sterile lantern
#

does sqlite automatically create a db file after u delete the old one

earnest phoenix
#

yes

sterile lantern
#

cuz I delete my old db but it comes back again but there’s no code that makes a db file

#

o

#

so if u just have “require quick db” it makes one?

sudden geyser
earnest phoenix
#

yes when u run the bot

sterile lantern
#

Ah so if I require the package it makes one right

#

Alright

earnest phoenix
#

whe u node

sterile lantern
#

I thought it was a command that’s why

#

hm so why is it named json.sqlite

#

bc I have it formatted in json?

crimson vapor
#

What the fuck that what

agile steppe
#

but dont work

quartz kindle
#

say is not defined

#

that Discord line is not doing anything

#

the name of the command says "clear"

#

the args check does not return

sudden geyser
#

code review™️

agile steppe
#

oof

#

i aint noticed

quartz kindle
#

also, will throw an error and crash if the bot does not have permissions to delete the message

agile steppe
#

ohh

#

ty for tellin

sterile lantern
#

is it possible to change name of quick db

#

rn it’s json.sqlite

#

I want it called data.sqlite

quartz kindle
#

dont think so, last time i checked it was hardcoded

agile steppe
#

or it can cause crash?

molten yarrow
agile steppe
#

um i actually dont know -w-

#

its not necessary?

molten yarrow
#

remove it :3

agile steppe
#

oh k

molten yarrow
#

same for the const Discord = require("discord.js") line

agile steppe
#

:3

mellow kelp
#

have you coded in javascript before

agile steppe
#

this is my first bot weirdsip

molten yarrow
#

also you checking if saywhat < 1

if you use say 0
it will tell return the Didnt provide text line :3

agile steppe
#

ahh

molten yarrow
#

you can check with if (!saywhat) return //your code

quartz kindle
#

delete the Discord line, its not necessary

agile steppe
#

ah ok

earnest phoenix
wintry stream
#

those three dots is your ide telling you it's never used

agile steppe
quartz kindle
#

if(!saywhat)

#

saywhat < 1 makes no sense because saywhat is not a number, it text

wintry stream
agile steppe
molten yarrow
#

looks nice now

agile steppe
#

ty yall

quartz kindle
#

it will still error if no permissions

agile steppe
quartz kindle
#

to avoid errors you need to catch

molten yarrow
#

yep true :3

agile steppe
#

what if i remove "message.delete()" then?

quartz kindle
#
message.delete().catch(error => console.log(`could not delete message because of ${error}`))```
#

same for .send()

#
message.channel.send().catch(error => console.log(`could not send message because of ${error}`))
agile steppe
quartz kindle
#

yes

#

on the first send too

#

thats one way to prevent crashes

agile steppe
#

um now when i send a message it says

#

Didn't provide any text to say

#

xD

molten yarrow
#

but why is he using args.slice(1).join(" ") now? it removes the first arg

quartz kindle
#

it depends on the command handler

#

but for many people, the first arg is the command itself

agile steppe
molten yarrow
#

yeah his handles it already i think

quartz kindle
#

try removing .slice(1)

agile steppe
#

still not working

quartz kindle
#

can you show your command handler code?

#

the part where is does command.execute(message, args)

agile steppe
#

ah

quartz kindle
#

your command handler is not designed correctly

#

show the full code for the message event

agile steppe
#

now im lost ;-; a friend was teaching me xD but hes sleeping

quartz kindle
#

remove all the if elses

regal creek
#

Thats a hella hardcoded command system

quartz kindle
#

and just do this ```js
const cmd = client.commands.get(command);
if(cmd) cmd.execute(message, args);

#

these two lines effectively replace all your if elses

#

and work for an unlimited number of commands

regal creek
#

That hurt my brain to look at

agile steppe
#

oof

quartz kindle
#

aside from that, the args look correct

agile steppe
quartz kindle
#

the catch shouldnt affect whether it works or not

#

its just an error handler

agile steppe
#

oof then i dont understand why when i have that catch it makes the bot dont say

#

sorrie for that epic english

quartz kindle
#

can you try adding it again?

agile steppe
#

sure

#

lol

#

now it works

quartz kindle
#

as i thought

agile steppe
#

thats weird

quartz kindle
#

it was probably just some delay in the code updating

agile steppe
#

ohhh okay

#

ty for your help

#

: D

quartz kindle
#

btw the catch should also be in the first .send() (on the if(!saywhat) line), otherwise it will still error if the bot has no permissions to send messages and tries to send one

agile steppe
quartz kindle
#

yes

#

now that command is crash-proof

mellow kelp
#

yea

#

you could also check first if the bot has permissions too

stark abyss
#
guild: 59454
  x: 'weekly',
  role: '6942002496'
  users{
    <MYID>: 300
   }```
this is probably basic Javascript but how do I get pk from a id that is in users
#

is that possible

#

I am trying to figure out how to organize my information/data

sudden geyser
#

Like [{ pk: ... }, { pk: ... }]

#

oh you changed it

stark abyss
#

I- Idek what I am doing I don't have anything as of now but I want to putthings in db in a organized manner

sudden geyser
#

What field does pk represent though? Is it 300?

stark abyss
#

pk = guild, idrk tbh i am unsure how to organize my information

#

I have guildID and then users in it right and then I also have information that is same for each user in that guildID

#
<clanID>: 59454
  due: 'weekly',
  entryFee: 5000,
  fee: 20000,
  role: '6942002496'
  users{
    <ID=P025#2022>: 300
    <ID=Starkwood#2002>: 500
   }```
this is what I have 4 of the things are same of each user
agile steppe
stark abyss
#

what is that 6th line even supposed to do

agile steppe
#

that line is for when you dont ask a question @stark abyss

stark abyss
#

but your reason doesn't make sense

#

if you are checking if they put something or not just do if(!args[3]) return ----

#

3 is an example you do that

modest smelt
#

How do I remove everyone who has a certain role?
The bot is being only used in one server so the role and the role id will be the same.

agile steppe
earnest phoenix
#

RichEmbed is no longer a constructor

#

you must use MessageEmbed();

#

@agile steppe

agile steppe
#

oh oke

earnest phoenix
#

also, use if(!Reason) return message.channel.send('Some message');

#

cause the questions is the var Reason, use !Reason

#

to make it have more sense

agile steppe
earnest phoenix
#

now it makes more sense

#

try running the command.

agile steppe
#

still not working

mellow kelp
#

you need to require Discord

earnest phoenix
#

you must define discord inside the block

mellow kelp
#

learn js first

agile steppe
mellow kelp
#

discord.js uses some relatively advanced js concepts

earnest phoenix
mellow kelp
#

wouldn't recommend global variables

earnest phoenix
#

i think it's better Thonk

mellow kelp
#

just require it when you need it

earnest phoenix
mellow kelp
#

o

#

thats not a global variable KEKW

earnest phoenix
mellow kelp
#

yea

#

thats what one normally does

earnest phoenix
#

ya

mellow kelp
#

imports and requires at the top of the file

agile steppe
halcyon kite
#

hi so i am making a work command and you have to type a specific code in order to get money, the only part is that the money adding wont work and it is unreachable. here it is

#

how should i fix it

earnest phoenix
#

you are using return to send the message

#

that's the problem.

halcyon kite
#

ok

earnest phoenix
#

you shouldn't use return to send a message if you are not trying to cancel the command.

#

or something like that

halcyon kite
#

ok

earnest phoenix
#

now does it works?

halcyon kite
#

yes thanks alot

earnest phoenix
#

np

halcyon kite
#

ok this is getting sad i have another problemo: so with the code when i type wrong code it wont register as wrong code so it says its right code how do I fix that? here where it should be doing that here

mellow kelp
#

i think you got the boolean wrong

#

it should be negative

#

and why are using array.includes?

#

just compare the captcha with the content

halcyon kite
#

hmmmmm it still wont work

earnest phoenix
#

Hmmmmmmmm

#

you must use the return this time

#

i believe

halcyon kite
#

for which tho? if i use it for the wrong message it only does wrong

earnest phoenix
#

Use if..else instead of doing the operation twice and use strict equality operator instead of Array.prototype.includes()

halcyon kite
#

ok

elder seal
#

...

halcyon kite
#

thanks it worked :D

humble echo
#

i need help!!!
how can ii make my hug command to take random gifs from reddit or other platform?

mellow kelp
#

Use the reddit api

humble echo
#

thanks

lament rock
#

You might want to consider a different api since reddit can return nsfw images

mellow kelp
#

Maybe

#

You can easily filter them out tho

#

Posts have an over_18 property

earnest phoenix
#

oh right, 2020 II is coming.

silver monolith
#

something weird is happening

#

none of the thumbnails for my embeds are loading

#

they'd work like yesterday

#

and i modified nothing

#

and its not working

#

also this is bad because my bot is about to be reviewed for the 2nd time

#

wait nevermind

#

it's a glitch

#

it works now

sudden geyser
earnest phoenix
#

lol

opal plank
#

This is probably not the best approach

#

But im not sure if scrapping is better than cookie gen

earnest phoenix
#

Tomorrow lol

earnest phoenix
#

Why my bot is.just showing this many less number of user connected i have been added my.bot in my.both 2k member server

gilded olive
#

Lang and lib?

earnest phoenix
#

English pls

gilded olive
#

Language and library?

earnest phoenix
#

My friend coded bot

gilded olive
#

Bruh

earnest phoenix
#

@gilded olive Il tell u in some.time

gilded olive
#

Alr

drifting wedge
#

how do i remove underline from href?

pale vessel
#

text-decoration: none;

drifting wedge
#

i found that when i googled it

#

but cant get it to work

pale vessel
#

show css

drifting wedge
#

u know where?

#

all?

#

its only 30 lines?

pale vessel
#

just css a { text-decoration: none; }?

drifting wedge
#

just a new project

#

lemme see

pale vessel
#

you might want to use a:hover

#

i forgot

drifting wedge
#

worked doe

#

ty

pale vessel
#

bru

#

nice

drifting wedge
#

i was trying class a {

#

not just a

pale vessel
#

nice

drifting wedge
#

rn making a knockoff imgur lmao

earnest phoenix
#

@pale vessel nice bro

#

Ur helping

pale vessel
#

?

earnest phoenix
#

I also need 1 Lil help

#

I added.my bot in my both 3k msmber server

#

But it still showing this many less users

#

Pls help

pearl trail
#

did you enable member intent in discord developer? All user isn't cached if member intent is disabled

earnest phoenix
#

@pearl trail 2m let me see

#

@pearl trail In which tab

#

General info

#

Oauth2

#

Bot

near stratus
pearl trail
#

oh, it's called presence intent

earnest phoenix
#

@pearl trail can u show me ss

#

of that tab pls

pearl trail
#

@earnest phoenix wait..

earnest phoenix
#

j

#

ok

pearl trail
earnest phoenix
#

hm

#

done

pearl trail
#

and make sure your bot is in below 75 guilds

earnest phoenix
#

now ?

pearl trail
#

restart your bot

earnest phoenix
#

ohk

#

@pearl trail how to restart

#

bcz my friend knows all

#

he coded bot

pearl trail
#

hmm, you turn on your bot in command prompt?

earnest phoenix
#

idk

pearl trail
#

hmm, so ask your friend to restart your bot

earnest phoenix
#

k

pearl trail
# earnest phoenix

or maybe try to use this command again. might be cached automatically ¯\_(ツ)_/¯

earnest phoenix
#

i used

#

but ist same

#

ill restart bot

#

when my friend come

pearl trail
#

oh okay

earnest phoenix
#

alr

pearl trail
#

it must be working if the code is
client.users.cache.size

earnest phoenix
#

yes its

#

how to change channel name?

#

and how to get channel name?

earnest phoenix
#

what?

#

dm

rustic nova
near stratus
#

Or at least someone told it'll work

summer torrent
#
db.updateOne({ guild }, {
                $pull: { feeds: { $elemMatch: { screen_name: "discord"} } }
})```
this is my code. But it doesn't remove item from array 🤔 no errors
pale vessel
#

I just use $pull: { feeds: { screen_name: "discord" } }

earnest phoenix
#

This is my code

#

How can I fix that error?

mellow kelp
#

you added an empty embed field

#

it literally says it there

sinful lotus
#

you even have stack trace, just follow it to see the source of problem

mellow kelp
#

learn to read stack traces

#

that will become very useful

pale vessel
#

learn to read stack traces, not stack overflow

#

or something thinkowo

mellow kelp
#

i gotta frame that quote somewhere KEKW

lusty quest
#

does a proxy for a MERN stack works also in production? so that i can prevent external calls to the Backend API (by not opening the Port externally)?
idk if google wants to troll me RN or im just tired but i cant find a clear answer

amber tundra
#

pog

clever agate
pale vessel
#

F

arctic hare
#

F

earnest phoenix
#

F

earnest phoenix
clever agate
#

@earnest phoenix yes

earnest phoenix
#

I don't understand from Quick.db

clever agate
#

@earnest phoenix tamam

earnest phoenix
#
    if(command === prefix + `registeredusers`){
        if(message.author.id !== '436136191922798592')return;
        if(registered === undefined){
            message.channel.send(`${message.author}, no one in the list. Try again later.`)
            return;
        }
        message.channel.send(registered).catch(console.error())
    }```
Its weird. If i type: !registeredusers is says:
#

ObjectParameterError: Parameter "filter" to update() must be an object,

#

getting this error

lusty quest
earnest phoenix
#

help me

earnest phoenix
lusty quest
#

2 lines down

#

you have a message.channel.send(registered) event

earnest phoenix
#

yes

lusty quest
#

this causes the error

#

bcs registered is never defined

#

spamming wont get you attention, only warnings or a kick

earnest phoenix
#

ObjectParameterError: Parameter "filter" to update() must be an object,

#

getting this error

#

@lusty quest Okay thank you

lusty quest
#

yes bcs it expects an object to filter

earnest phoenix
#

can you help me i dont know how to do

lusty quest
#

MongoDB?

earnest phoenix
#

yup

lusty quest
#

use findOneAndUpdate({Key:value},{your update})

earnest phoenix
#

okkk

dapper ocean
#

What databases do people usually use? :> for discord bot developing

earnest phoenix
lusty quest
#

update many

earnest phoenix
#

amount+ and amount -

lusty quest
lusty quest
earnest phoenix
#

i use mongoose

#

can you re write just few lines of code?

lusty quest
#

i can give you pointers

#

its almost correct

#

you just need to use a object to filter

earnest phoenix
#

ObjectParameterError: Parameter "filter" to update() must be an object, got 773509714465390612

dapper ocean
earnest phoenix
#

just help me please

#

i cant figure out

#

please

lusty quest
earnest phoenix
#

Sir Superbrain

dapper ocean
#

Do you like mongo more?

lusty quest
#

since you can shard it pretty easy

lusty quest
#

like a unique key in your database.

#

if you dont know send a snipped of your schema here

earnest phoenix
#

ok

lusty quest
earnest phoenix
#

please rewrite and give

lusty quest
#

did you refer the Wallet to a member? bcs there is only a guild id

#

or is id the Discord user id?

earnest phoenix
#

userid

lusty quest
#

ok

earnest phoenix
#

Hello I would like to make a new design to make it more welcoming because the one now it and a little can ugly I will not hide it and I would like to make design like that on the 2 photo included video if you could help me how to make its would be awesome ^^

#

i want a user to pay another user

lusty quest
#

membersDB.update({id:fromID}, { $inc: { wallet: -amount } }),

#

see the difference?

#

just make sure fromID is the userid from the user you want to take it from

earnest phoenix
#

is it discord user id?

lusty quest
#

if the id in your schema is it yes

earnest phoenix
#

OK

#

Yes........

lusty quest
#

i suck frontend so sorry

earnest phoenix
#

Hello I would like to make a new design to make it more welcoming because the one now it and a little can ugly I will not hide it and I would like to make design like that on the 2 photo included video if you could help me how to make its would be awesome ^^

lusty quest
#

did you know some css?

lusty quest
#

well you probably want to know it to do such stuff

#

i saw the pictures the first time

earnest phoenix
#

Yes ah oket

#

How we make.-.

lusty quest
#

lean CSS. but idk exactly where to set it in your Bots long Description, there is a Markdown tag for it iirc

earnest phoenix
#

Yes, I know there's that.

#

I just use the CSS a few times

#

It was for color except that's it's skinny

foggy stream
#

i need help ... the bot does not respond to commands and does not log any errors .. I deleted discord.js and reinstalled what should I do?

foggy stream
#

My English is not good, I don't understand what you're saying, can you explain?

lusty quest
#

did you use a Command Handler?

#

its possible that your Command is not loaded.

foggy stream
#

oh

lusty quest
#

or your prefix is bugged

earnest phoenix
foggy stream
#

My friend deleted it

#

bruh

lusty quest
#

well there is the issue why the commands wont fire

#

did you use github to share the code?

foggy stream
#

nope

lusty quest
#

rip then

foggy stream
#

I'm trying something for a minute and I'll come

#

ok i took care

#

@lusty quest thank you so much

#

My friend completely erased the place where I drew it, and these commands did not load and did not run.

lusty quest
#

yea without command handler you wont run any command

foggy stream
#

thx

earnest phoenix
#

@lusty quest I am not able to create user if he doesnt exist

lusty quest
#

?

earnest phoenix
#

if it exist it works fine

lusty quest
#

use upsert in your update query

earnest phoenix
#

where

lusty quest
#

did you know MongoDB basics?

earnest phoenix
#

sorry but i am not very pro in mongoose

#

i know

#

basics

#

but i still find difficult to use

lusty quest
#

bcs you only create a object but never insert it into a database

#

you get the idea maybe, somewhere in the future

earnest phoenix
#

i hope so

#

please fix for me

#

everyone has to start from somewhere

lusty quest
#

in your if(!dataBank) state you only create the object but never save it

earnest phoenix
#

oh

lusty quest
#

you can also set a default for the starting money if you havent

earnest phoenix
#

I already did 10

lusty quest
#

oik

earnest phoenix
#

still not returning

#

creating user

lusty quest
#

why memberDB?

earnest phoenix
#

its emembers

lusty quest
#

you dont really need to store the db call

earnest phoenix
#

i recheck

#

membersDB

lusty quest
#

the syntax looks right did you check that you look into the correct Database

earnest phoenix
#

Thanks buddy worked

#

i forgot to findOne/Match if it exist (ToID)

#

@lusty quest Sorry for ping but one last query

#

can i ask?

lusty quest
#

where did you stuck now?

#

you want to query a nested document?

earnest phoenix
#

yes

#

like inc wallet -> balance

pale vessel
lusty quest
#
membersDB.updateOne({id: toID}, { $inc: { "wallet.1.balance" : amount } })
``` try this
#

not sure but you maybe can replace 1 with $

earnest phoenix
#

ok

#

ok

#

getting error

pale vessel
#

Try $

#

I use that

#

1 is specific

#

$ matches the query filter

earnest phoenix
#

its creating 2 wallet

lusty quest
#

is the path correct?

earnest phoenix
#

yup

#

and data is not updating too

lusty quest
#

how does the document looks now?

earnest phoenix
#

schema?

lusty quest
#

the document

#

looks fine for me

#

you have 2 unique users

earnest phoenix
#

yes

lusty quest
#

but it wont update?

earnest phoenix
#

they all have 2 balance

earnest phoenix
#

m

lusty quest
#

try wallet.balance instead of wallet.$.balance

earnest phoenix
#

ok

earnest phoenix
lusty quest
#

well then the other one is correct

earnest phoenix
#

can you recode above

lusty quest
#

need to search some stuff up myself then. havent used this in a while

earnest phoenix
#

ok

#

ping me if you get

lusty quest
earnest phoenix
#

ok

lusty quest
#

'wallet.balance'

earnest phoenix
#

ok

#

nope

lusty quest
#

still an error?

earnest phoenix
#

yes

#

without nested works fine

lusty quest
#

same error?

earnest phoenix
#

nope

#

i am not getting receiver account in database

lusty quest
#

so its something completely different

earnest phoenix
#

probably

#

c

lusty quest
#

hmm

earnest phoenix
#

but nested not working

lusty quest
#

strange, all i can find suggests the code from the stackoverflow page should work

earnest phoenix
#

ok no problem

#

thanks for help

#

it still works though

atomic vault
#

how to identify if the server is boosted or not in js

lusty quest
#

^

clever agate
fierce ether
#

is anyone familar with custom domains and linking to dashboard?

lusty quest
#

use your current name server provider and point the domain to your servers ip

clever agate
fierce ether
#

im using local host right now, how do i change to domain @lusty quest

lusty quest
#

did you have a static Ip adress from your ISP?

fierce ether
#

im using go daddy and it has none

lusty quest
#

YOUR ISP not your Domain provider

#

bcs you use LOCAL HOST

fierce ether
#

whats isp

lusty quest
#

Internet Service Provider?

fierce ether
#

yeh what about it

lusty quest
#

yea you have no idea about what i talk, i dont think you will understand what to do

fierce ether
#

i will

#

just explain and i may

lusty quest
#

well it requires that you answer the question if you got a Static IP from your ISP

#

if not get a VPN that gives you a static IP

fierce ether
#

its static

lusty quest
#

then bind the Domain to the IP

fierce ether
#

wdym bind

#

and a dns?

lusty quest
#

use your name Server provider to set a A record pointing the Domain to your IP

fierce ether
#

it dosent work

#

dosent let me on ionos

lusty quest
#

you said you use GoDaddy?

fierce ether
#

im using ionos for one and go daddy for a diff

#

but how do i do it on go daddy

lusty quest
#

idk never used goDaddy

fierce ether
#

wait whats host?

lusty quest
#

your server?

fierce ether
#

and points to is domain?

lusty quest
#

yes

fierce ether
lusty quest
#

switch the ip with the domain and try again

fierce ether
#

the opp way around?

pulsar bone
#

how make bot read embeds in python can't find it on google

#

read like message.content

#

if(message.embed.title("hello"))

#

something like that

#

in python

#

will it pickup embed title because i think it will take "title" as variable

#

i didn't make one just collecting knowledge

pulsar bone
#

wait you are sending that embed from a other bot right? right?
and i need to check if a specific word is present in title so what should i do

#

shouldn't it be like

 if 'world' in message.content
#

if the title is not exact it won't work ig

#

yup

dire loom
#

Hi does anyone know how to download the PyNaCl library for bot to play music with voice? Coz I tried with pip install on terminal and it backfired for some reason

#

I have the commands in my bot

#

But I cannot play music

#

Like on terminal...I downloaded...then it said upgrade pip to 20.3.smth then I upgraded...then I pasted the code to download the PyNacl library again...but it just said request already satisfied...

#

I tried to make my bot work thinking it was just me

#

But it was still not working

#

Let me pm u pics of what I see on terminal and the error shown by my bot

sick fable
#

I coded a command which sends Dig pics and i dont want it to send .mp4 extension. I will send my code too if anyone is willing to help me

#
import json
@client.command()
async def dogpic(ctx):
	url = "https://random.dog/woof.json"
	ans = requests.request("GET" , url)
	x = ans.json()
	a = (x['url'])
	await ctx.send(a)```
wintry stream
#

well

lusty quest
#

the api returns them as a jpg?

wintry stream
#

not '.mp4' in x['url'] or not x['url'].endswith('.mp4')

sick fable
#

Including jpg too

sick fable
#

Nvm it worked

#

Thanks

wintry stream
#
import requests
import json
@client.command()
async def dogpic(ctx):
    url = "https://random.dog/woof.json"
    while True:
        response = requests.get(url)
        response_json = response.json()
        image_url = response_json['url']
        if not image_url.endswith('.mp4'):
            break
    await ctx.send(image_url)
#

i wrote it meanwhile 😊

sick fable
earnest phoenix
#

shouldn't use requests, it's blocking

wintry stream
#

shouldn't use requests, it's blocking

#

@sick fable fair point

#

check out httpx

#

it has an async http client

sick fable
#

@wintry stream yea

wintry stream
#

but i wouldnt worry about it yet if you have low traffic

dire loom
#

how do we check what version of pynacl library we have on terminal?

#

for music bot

earnest phoenix
#

I am making to make code for my bot to come online from 2 days but its sucking me ik other commands but can anyone tell me and give me source code which i can use and telll me use of EventListener and awaitReady

#

plz help

dire loom
#

anyone knows the codes for making my bot track messages and store them in the bot's server itself?

#

can send source code if possible>

#

?

faint token
#

@dire loom discord.js or py?

dire loom
faint token
#

Yikes I don’t know the exact code for it

#

But it mostly using the on message event and then you can do client get channel to send message in

pale vessel
#

sounds like a privacy breach

earnest phoenix
#

I am making to make code for my bot to come online from 2 days but its sucking me ik other commands but can anyone tell me and give me source code which i can use and telll me use of EventListener and awaitReady
plz help (java)

lusty quest
#

not many here use java

earnest phoenix
#

what many use?

lusty quest
#

javascript, python

earnest phoenix
#

rip

#

Alguem br pra me ajuda com o bot ?

lusty quest
lusty quest
#

look into the docs of your api client (if you use one)

earnest phoenix
#

i do not

lusty quest
#

why? they usually make it easyer

quartz kindle
#

he does lol

#

hes using jda

frigid tendon
#

can you send me the help command in discord.js and config.json ?

frigid tendon
#

thanks

rocky hearth
#

For TS: I have a class named Piece
and I'm returning its subclasses (not instances) from a function
How do I let ts know about this?
I mean how do I set the return type?

dapper ocean
#

What’s better? AWS or Google Cloud or Azure?

frigid tendon
#

can you please send me with full informations because this isn't in order

lusty quest
#

start the guide at the start

lusty quest
frigid tendon
dapper ocean
#

Like I am setting MongoDB for my bot right now

#

And having some problems with choosing cloud service

lusty quest
#

all 3 of them will be fine

dapper ocean
#

What do you use?

lusty quest
#

Digitalocean

#

the pricing is less confusing than AWS or Google

dapper ocean
#

Mongo doesn’t have digitalocean okeh

lusty quest
#

i host the Mongo instance myself lol

dapper ocean
#

Oh

earnest phoenix
lusty quest
stuck pike
#

so i have a problem

#

i made a event guild server add

#

so it sends welcome message whenever a peep join

#

but my bot is public

#

and i need it to only work for my support server

#

{
if (client.guilds.id ==! '645650731789058099') return ;
const wlcmmsg = new Discord.MessageEmbed()
          .setTitle(`${member.user.username} has joined the server!!`)
          .setColor('#9b6dff')
          .setThumbnail(member.user.avatarURL())
          .setDescription(`![yp_NitroBoostGold](https://cdn.discordapp.com/emojis/791587647717507123.webp?size=128 "yp_NitroBoostGold") Hey There,welcome in Akemi support server enjoy your stay.Check ![yp_rulebook](https://cdn.discordapp.com/emojis/791590342877118474.webp?size=128 "yp_rulebook")Rules and dont forget to say a HI ![PikaWave](https://cdn.discordapp.com/emojis/756545493353627809.webp?size=128 "PikaWave") in general chat,use -invite to invite Akemi   `)
          .setTimestamp()
client.guilds.cache.get("645650731789058099").channels.cache.get("791657334240968706").send(wlcmmsg)

})
#

it sends of all 21 servers

warm marsh
#

!==

frigid tendon
#

i have a problem with commands help can you sead another pls in discord.js and config.json

stuck pike
#

lmao

stuck pike
warm marsh
#

Looks alright.

lusty quest
stuck pike
#

lmao

earnest phoenix
lusty quest
#

i have no idea about jda and have like you to google the stuff, where its most likely that the 1st or 2nd hit is what you need

stuck pike
#
const ms = require('ms');
const Discord = require('discord.js');
module.exports = {
    name: "embedc",
    description: "Starts a giveaway",

    async run(client, message, args) {
        if (!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send('You are not allowed to start giveaways');

        let channe = message.mentions.channels.first();

        if (!channe) return message.channel.send('Please provide a channel');

        let giveawayDuration = args[1];

        if (!giveawayDuration) return message.channel.send('Pleae provide a valid title');

        let giveawayWinners = args[2];

        if (!giveawayWinners) return message.channel.send('Please provide a valid discription');

        const e = new Discord.MessageEmbed()
        .setTitle(giveawayDuration)
        .setDescription(giveawayWinners)
.setColor('RANDOM')
message.channe.send(e)
#

whats wrong

lusty quest
#

pls the start of the error trace

stuck pike
#

wdy,

lusty quest
#

usually the first few lines of the error contains the information to solve the issue

stuck pike
lusty quest
#

yea but i think i see what your issue is

quartz kindle
#

message.channe.send is wrong

stuck pike
#

i made that as a const

lusty quest
#

channe is not a thing

quartz kindle
#

channe is a separate variable that you created

#

its not part of message

stuck pike
#

o

#

ggs fixed

earnest phoenix
#

Hi I want to create a rank card type without any 3rd party npm package. I would like to know if it's possible or not?

stuck pike
#

nope

#

use canva

#

canvacord good

quartz kindle
#

node does not have a built in graphics drawing module, so you have to use a third party one

#

the node-canvas module simulates the same canvas API as the one built into browser JS

earnest phoenix
#

Ok got it.

stable eagle
#

How can I remove someone's nickname?

#

discord.js

lament rock
#

Pretty sure if you pass it null instead of a string, it resets it

stable eagle
#

hmm, imma try

#

it does ty

stuck pike
#

what is work of dsl

#

@pliant gorge

lusty quest
#

sending Server informations to the top.gg website

#

needed for listed Discord servers there

stuck pike
#

aaah

#

being a solo devloper is hard

#

reep

tulip ledge
#

new Date().toLocaleString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour12: false, timeZone: 'Europe/Copenhagen' })

#

how to make this also say the hour?

#

It onyl sais: Friday, December 25, 2020

hasty mulch
#

Is it possible to call a file that I have stored on my device in a Python script?

earnest phoenix
#

Hm

#

I don't know

quartz kindle
#

english great britain

quartz kindle
vapid fossil
#

Hi

#

How to add

#

Background image

stuck pike
#

in?

#

@vapid fossil

vapid fossil
#

On my bot page

#

In description

#

Totu

#

@stuck pike

stuck pike
quartz kindle
#

with css

vapid fossil
#

Do you know?

stuck pike
mellow kelp
#

Epik

vapid fossil
#

No one kn9ws

#

Knows

#

Eh

quartz kindle
#

i just told you lol

vapid fossil
#

What is css

#

Lol

#

I don't know can u explain me

mellow kelp
#

google it

#

learn css

quartz kindle
#

css = cascading style sheet
its a scripting language that defines styling for html pages

vapid fossil
#

:0

mellow kelp
#

and its also

#

pain

gilded olive
#

it's absolute pain

#

if you need css you google

mellow kelp
#

css is one of the only languages whose answers on google will mostly not work

gilded olive
#

disagree

#

if it isn't exactly what you want you just edit the numbers

#

ez pz

mellow kelp
#

big brain

gilded olive
#

no actual math calculates what determines a "try"

#

what that does in reality is generates a random int

#

prints it

#

delcares "tries" as an int of 3

#

you do a while True: which is bas enough

#

you wait for a message with no checks which is bad

#

and you should look into

if:
  #code
elif code:
   #code
else:
  #code```
#

and remove that while True

#

and also add the check kwarg into wait_for so you don't listen to every message

earnest phoenix
#

I'd use for else instead of while True

gilded olive
#

"then though"?

#

in that first if

#

well first else actually

#

you can declare that tries is now 2 or whatever you want

earnest phoenix
#

guys how to sort data in mongoose and display highsest first on lowest last

solemn latch
#

Mongoose should have a sort parameter

earnest phoenix
#

thats what i dont know. I am mediocre

inner roost
#

idk Pikaxd

solemn latch
#

Mongoose docs are the best way to learn about mongoose

#

Most libs docs are

earnest phoenix
#

ok thanks

#

lemme try

misty sigil
#

or you can find all and sort the arr

#

i think....

gilded olive
#
        def check(m):
            return m.content == "whatever" and m.channel is ctx.channel```
#
await bot_instance.wait_for('message', timeout=30.0, check=check)```
#

I'd put those in a try/except

#
def check(m):
  return m.content == "whatever" and m.channel is ctx.channel

try:
  await bot_instance.wait_for('message', timeout=30.0, check=check)
  #code
except asyncio.TimeoutError:
  pass```
#

whatever should be whatever you are checking

#

i just put that there as an example

#

should work yea

#

Feel ya

#

there is a way to get around this tho @earnest phoenix

#

I'll show ya in a bit brb

#

nvm it wouldn't be useful in your case

dapper ocean
#

Guys, who use Mongo. Can you explain what is the difference between cluster, database and it’s collections? 😂😂

#

Like i read about them, still don’t understand

earnest phoenix
#

A string never be equal to type

stark abyss
#
            pool.query(`UPDATE claninfo SET entryFee = ${entryFee}, fee = ${fee}, role = ${role}, WHERE clan = ${clanID};`, (err) => {
              if(err) return console.log(err + " | clan exist query")
           })  

error: syntax error at or near "," | clan exist query

#

where is this error

earnest phoenix
#

you should sanitize your input

stark abyss
#

but they all are numbers

pale vessel
#

or are they?

stark abyss
#

yeah i made sure they are numbers before

earnest phoenix
#

you should still sanitize everything that is a parameter in your query

pale vessel
#

It's a good practice

stark abyss
#

okay got it

pale vessel
earnest phoenix
pale vessel
#

i'm not sure

stark abyss
#

no it occurred even when it wasn't there

misty sigil
earnest phoenix
#

Hi

surreal sage
#

The new bot commands integration for in chat

#

(/)

#

Is that out yet?

#

And how does it work?

earnest phoenix
#

yes it's in beta

surreal sage
#

thx

earnest phoenix
#

they're not that useful though

surreal sage
#

Is it out on d.js yet?

earnest phoenix
#

i think not

misty sigil
#

no

earnest phoenix
#

someone mentioned it's planned for v13

misty sigil
#

you can still set it up yourself tho

surreal sage
#

yea true

gilded olive
#

it's kind of bad

#

and limited

earnest phoenix
#

this tbh

#

you're better off sticking with your usual command handler

gilded olive
#

wait until they make it better

#

which is another 2 years

surreal sage
#

kk

misty sigil
#

its like typescript for commands but its worse than js

lyric mountain
#

Slash commands are kinda a superfluous and redundant thing

#

Like, if it had been like this from the very start

#

But now we all have our own handlers very finely adjusted

earnest phoenix
misty sigil
#

php

earnest phoenix
#

python

lyric mountain
#

Windows 8

earnest phoenix
#

agree

#

8.1 is usable

lyric mountain
#

Windows 8 is for mobile users who don't own a mobile

earnest phoenix
#

win7 though

#

9th circle of hell

#

@earnest phoenix i have ubuntu on my pc too

#

but i dont use it

#

reee

#

cuz i fucked up the partition with very less storage

#

how do i increase

lyric mountain
#

Legend says hell is ruled by that paperclip dude from xp

earnest phoenix
#

i just use win10 and the work i have to do on linux i do with WSL2

#

fucking hell why do i always select the wrong reactions

lyric mountain
#

Reactionlepsy

earnest phoenix
#

/windows\d/ sucks
use wine on linux

#

don't get me wrong

#

win7 was AMAZING for its time

#

but it's heavily outdated now

#

and that's why we should use vista

lyric mountain
#

How to differentiate win7 from win vista: purble place

earnest phoenix
#

lmfao

#

but fr though there's no reason to not use win10 now

#

it's stable

#

kind of

#

but they're slowly rewriting it to include 10x features

#

they've also been open sourcing a ton of shit so there's hope

#

win 7 is outdated
no reason to use win 10

#

im tired

#

:(

#

fixed

ancient crow
#
<p href='https://gooogle.com'; class="button";>browser</p>  ```

anyone have any idea about this button when i try to click the button it wont take me to google.
lyric mountain
#

That's a paragraph

earnest phoenix
#

paragraph tags can't have hrefs

#

only anchor tags

mellow kelp
#

it has to be an anchor tag

ancient crow
#

oh

lyric mountain
#

Also, semicolon in html tags?

mellow kelp
#

oh and attributes don't have a ;

earnest phoenix
lyric mountain
#

If you're tired, who threw a tire at you?

ancient crow
#

i removed ; attributes and changed p to a

#

what else i have to do waitWhat

lyric mountain
#

Have u tried it?

ancient crow
#

yeah it doesnt make any button

earnest phoenix
#

@ancient crow it is supposed to make a clickable text link

ancient crow
#

thats output

lyric mountain
#

Semicolon

earnest phoenix
#

@ancient crow there is no closing tag for the anchors

lyric mountain
#

And semicolons

ancient crow
#

there is but thats output

lyric mountain
#

Also, you can just use markdown for urls

mellow kelp
#

thats not how an html tag works KEKW