#development

1 messages · Page 1413 of 1

green kestrel
#

someone else was smashing their desk with a lump hammer

#

and rtx voice filtered it out

desert hazel
#

but his mic sounds weird

#

like his voice

#

it sounds faked

green kestrel
#

nah its not faked

#

but he explains later on why his voice sounds odd

desert hazel
#

ik its not, but his mic sounds fake

#

oh yea im at that point now

green kestrel
#

the more background shit rtx voice has to filter out, it loses quality

#

like an mp3

desert hazel
#

oh

#

brain is your monitor 1920x1080?

green kestrel
#

one guy had a leaf blower, and he put the leaf blower right up to his mic

desert hazel
#

oh lol

green kestrel
#

you could understand him and only hear him but it was like he was in a tin can

desert hazel
#

yeye

green kestrel
#

but for a busy house, where you got someone microwaving dinner, and kids screaming and fighting, and oven on, loud fans in pc... it filters all that out real well

#

and it barely uses any cpu

#

or gpu

desert hazel
#

wow

green kestrel
#

thats the main reason i got it

desert hazel
#

yeeeyee

green kestrel
#

because that screen is 1920x1200

desert hazel
#

ohh

green kestrel
#

that stream is using RTX voice

desert hazel
#

Suggestion, game down a little and mic up a little, or closer to you

green kestrel
#

tbh i dont have much to say lol

#

i might have more to say for my own games

desert hazel
#

you gotta just talk to yourself until someone joins lol

#

when i played VR stream i was talking shit to the peds lol

#

you got a greenscreen brain?

#

look at 7:40 and wait till the car goes past, can hardly hear you @green kestrel

green kestrel
#

Yeah I got a greenscreen

desert hazel
#

nice

#

right, gn

green kestrel
#

Nn

jaunty surge
sudden geyser
#

You probably meant to use the .updateOverwrite method instead of .overwritePermissions

jaunty surge
#

I'm creating the role for muted

#

so I should use .updateOverwrite?

sudden geyser
#

This does not match the signature of the .overwritePermissions function because the first argument should be an array or collection of overwrites.

#

However, it does match the signature of .updateOverwrite

jaunty surge
#

oh

#

let me try it

#

@sudden geyser yeah it actually work, everything is good but the only problem is that it didn't really create the muted role for my server.. 😂

#

do you know how to fix it

sudden geyser
#

It didn't create the role with the correct settings because you didn't pass an object with the correct structure: https://discord.js.org/#/docs/main/stable/class/RoleManager?scrollTo=create

The object has a data key, which is where you'll store stuff like the name, color, permissions, etc.

So, instead of .create({...}), use .create({ data: {...} })

jaunty surge
#

@sudden geyser thank you, it's done, it added muted role to my alt account and it muted for some time, but my alt can still type... 😂 I'm really sorry-

earnest phoenix
#

I'm using discord.js. I want to write a code to check if there is a message starting with the id of the user who sent the message in the specified channel, but I do not know how to do it. Can anyone please tell me how to do that?

astral yoke
#

let id = bot.db.get(`${reaction.message.guild.id}-close-${user.id}`) id.delete()
if i set the database as an embed that was sent how would i be able to edit that embed or rather delete it

sudden geyser
jaunty surge
#

@sudden geyser yeah I checked and the muted role doesn't have them disabled

#

it's completely like the normal new role without disabling permission

sudden geyser
#

If you delete the prior roles and try again, does it add them?

jaunty surge
#

@sudden geyser it works!! thank you so much!❤️

opal plank
#

@jaunty surge avoid using var on your code

jaunty surge
#

@opal plank thank you

#

i will change it

earnest phoenix
#

How can I make a webhook integration, so that i can see servers my bot is added to?

opal plank
#

just use the bot to post it on a channel

earnest phoenix
#

And how can i just shoot that shit?

#

ctx?

opal plank
#

you using py?

earnest phoenix
#

yh

#

@opal plank

opal plank
#

im not sure how py handles event listeners tbh

#

prob worth to check their docs

earnest phoenix
#

hmmmm i can't find GUILD_CREATE in the 'ocs

opal plank
earnest phoenix
#

True

#

It's discord.on_guild_join

#

@opal plank

opal plank
#

then there you have it

#

that should be fired whenever you join a new guilçd

#

it probably returns a guild object

earnest phoenix
#

did you know... technically clients can own guilds

opal plank
#

yes, under 10 servers

#

or something along those lines

#

but thats completely offtopic to what you asked

earnest phoenix
#

man... in last 10 min my bot has been added to 10 servers

#

bruh power™️

opal plank
#

my bot needed to be verified in the first 5 days of uptime

earnest phoenix
#

i'm scared of fucking this up, lmao

#

hold up

#

this is so ez

#

im not gonna verify this bot

opal plank
#

you'll need to eventually if you want it getting past 100 servers

#

¯_(ツ)_/¯

earnest phoenix
#

nah, not giving up my privacy for some bruh bot

opal plank
#

they gonna hack u with your passport

#

big brein

earnest phoenix
#

unless i make a fake id ClappingHacker

#

joke

#

lmao

opal plank
#

and get into legal issues. Sounds like a good plan

earnest phoenix
#

can't get into legal issues if they don't know who you are

#

it's like ddosing without an ip address

opal plank
#

hmmmm

earnest phoenix
#

anyway

opal plank
#

yeah surely the governament doesnt have any way of tracking you

earnest phoenix
#

not gonna verify it

#

dont think the government is gonna be after me

#

again

opal plank
#

nor will discord

#

nor stripes

earnest phoenix
#

not doing it so it won't matter

opal plank
#

welp, its your problem

#

im arguining that your reason is invalid

#

if you simply dont wanna do it, its on you

#

and i respect that

earnest phoenix
#

@opal plank thank you for the help

opal plank
#

np

earnest phoenix
#

👍

#

god is digitalocean expensive but good

fervent hornet
# earnest phoenix not gonna verify it

Idk if you've fully made up your mind, but Stripe and Discord are both very reputable companies. They only use your passport in case your bot is a legal issue, and if they'd have to be in contact with the government.

earnest phoenix
#

See, I don't like mass-surveillance

umbral zealot
#

That's not mass surveillance.

fervent hornet
earnest phoenix
#

Who said Discord had my information?

#

not breaking the law here

umbral zealot
#

Stripe already has your credit information. Because you have Nitro.

fervent hornet
earnest phoenix
#

@umbral zealot who said i paid using credit card?

opal plank
#

thats holding you accountable for shit you may do in the future

earnest phoenix
#

i can see that

#

I'm just not interested in this current time to give my privacy away

umbral zealot
#

However you paid for it, Nitro would need billing information, and it goes through Stripe.

opal plank
#

once your bot gets in too many servers it can cause a kurfuffle

umbral zealot
#

But hey if you don't want to grow your bot, that's 100% up to you.

fervent hornet
earnest phoenix
fervent hornet
#

Ik this is kinda off-topic, but I personally feel like it doesn't matter. So what if they show me effective ads? Big tech is just making money of my data, there's nothing criminal they do with it. lol

opal plank
#

thats precisely what i said before. If you dont wanna do it, i respect it. Im arguing that your reasoning is invalid imo

#

im not trying to convince you to do it

#

nor to not do it either

umbral zealot
#

You don't need to "deal" with it anyways - if you don't verify, your bot stops at 100 guilds, and no one can add it.

earnest phoenix
#

Saying privacy doesn't matter because you have nothing to hide is like saying free speech doesn't matter because you won't speak

umbral zealot
#

Let's stop this conspiracy theory "us vs them" conversation ^_^

opal plank
#

to put very blunty, we all here are nobodies. We are too small for anyone to even care about us. We are simply a number on their graphs

earnest phoenix
#

perhaps i shall look it over

opal plank
#

this is my bots users

#

think every single one of them thinks: oh, there are bots here, its probably storing all my messages and selling it to advertisers?

#

theres a clear line where concern becomes madness

opal plank
#

not only you are liable for stuff, the companies are also legally binded

#

they want you to be held liable so THEY dont have to deal with it

#

like Youtube

#

with copyright strikes

#

why should youtube deal with pirated content on their platform?

fervent hornet
#

Ye, they can't do anything with your data or two things would happen:
PR lol, the worst disaster any company could deal with way worse then legal 😂
Lawsuits lol

opal plank
#

screw it, let the creators deal with the problems they created themselves

#

if your bot goes on a rampage deleting every server and there is legal stuff involved, discord wont wanna have a pint to do with it

#

they'll throw all responsability to you

#

most likely*

earnest phoenix
#

working on new bot, i cant wait for my new server to come in so i can switch from this low power cpu

#

Anyway

#

Hey, I'm having some issues with this because of "invalid syntax" can someone help me out? async def discord.on_guild_join(guild):

sudden geyser
#

yes that's not valid

#

You're probably looking for the @client.event decorator.

#

remove the discord. part and add the @client.event decorator.

#

client should be whatever your client has been defined as (e.g. bot, client)

earnest phoenix
#

i love you

#

Like this? @client.event async def on_guild_join(guild):

#

@sudden geyser

#

should be fine

#

What about if i only wanted humans to trigger bruh?

sudden geyser
#

on_guild_join is called when the bot joins a guild

#

not when a user joins a guild

earnest phoenix
#

it's unrelated to the current question

sudden geyser
#

confused

#

Maybe you're looking for the on_member_join event

earnest phoenix
#

It's got to do with my message.content, it's totally unrelated from my first question.

agile lance
#

Whats the difference between doing: if(!message.author.id == `my id`) return;

and

if(message.author.id !== `my id`) return; 
earnest phoenix
#

also holy shit im in 21 guilds

#

21 savage lmao

umbral zealot
#

Because, the first means if(false === 'my id') return

agile lance
#

Ohh, So if(! something ) is saying if something is false/not true == something?

#

So what does !== do then?

umbral zealot
#

No, what this means is that ! means "NOT" and it automatically converts the thing into a boolean

#

! anything that's truthy will turn it into false

#

Whereas !== means "NOT Equal To"

agile lance
#

Oh ok

#

Thanks :-)

sudden geyser
#

! by itself converts something to true/false. !== checks if something is not equal to something, which is the equivalent of writing (if (!(message.author.id === "myid")))

umbral zealot
#

so (!a == b) means (NOT a == b) but (a !== b) means (a NOT == b)

agile lance
#

Oh ok

umbral zealot
#

it's... actually to be honest, javascript is usually read in the same order as english

#

as long as you understand the syntax

#

"if a not equal to b" reads much better than "if not a equal to b" 😂

earnest phoenix
#

I'm attempting to post a channel when a new guild is joined. This is the code:@bot.event async def on_guild_join(guild): channel = bot.get_channel(782070830649704459) await channel.send('Nice! Bruh-bot was added to another server. Info about the guild. Name =`' + str(discord.Guild.name) + '`. ID = ' + str(discord.Guild.id)) but it outputs this: Nice! Bruh-bot was added to another server. Info about the guild. Name =<member 'name' of 'Guild' objects>. ID = <member 'id' of 'Guild' objects>

#

discord.Guild is a class, you need the object, guild is your object

#

so just guild.name

tribal siren
#

so i got one question

earnest phoenix
#

@earnest phoenix king

tribal siren
#

for example i want to do a command "<random"

#

bot says me: say a random number between 1 and 5

umbral zealot
#

you'd need Math.random() for that

tribal siren
#

i say number 2 and bot says me great job

umbral zealot
tribal siren
#

oh

#

that's not the main question tho

#

i want the bot to react on my answer

#

for example if i wanted to do reaction role commands

#

it says: choose a channel

umbral zealot
#

That's a completely different question lol

tribal siren
#

then i write a channel, and it goes to step 2

umbral zealot
#

What you need then in awaitMessages

tribal siren
#

oh

#

ty <3

ember lodge
#
channel.push(`channels`, "782078354902745129")
TypeError: Target is not an array.

i am trying to use .push to the DB but i can't

#

It's quick.db

boreal iron
#

push() adds an element to an existing array, nothing else

earnest phoenix
#

I'm getting an error with this: requests.post, it's giving me a syntax error

#

i imported requests

#

what's your code though

#

requests.post('webhook', 'message')

#

@earnest phoenix

#

not enough to see the syntax error

#

here's the full code:

tight scaffold
#

am i allowed to make the Join Support Server button more rounded, and if so how

earnest phoenix
#

I'm now getting this error, I found the other one out @earnest phoenix "content": "`" + str(message.author.id) + '` / `' + str(message.author.name) + '` just added the bot in `' + str(guild.id) + '` Awesome for them!' NameError: name 'guild' is not defined

#

what's your full code

#

Guild is certainly defined because the bot uses it earlier..

#

my guess is as good as yours if you dont show the code, how am i suppose to work with this

#

hold on

#

i think i may have figured it out

pale vessel
tight scaffold
#

alright

tight scaffold
#

wait shit did i have @ on

rustic nova
#

the selector should be #support

pale vessel
#

Lmao

tight scaffold
#

ah neat

rustic nova
reef carbon
#

Does anyone know how I can login to one of my postgresql users called exo_user in linux? I want to login to exo_user and then create a database inside that user

brazen epoch
#

Where do we get the dbl token for a server

#

not a bot

hollow sedge
#

Servers get tokens?

rustic nova
#

but you wont get it yet because you need a approved bot

brazen epoch
#

server?

rustic nova
#

Server doesn't have tokens

brazen epoch
#

Not bot

#

Then how do we know when someone votes a server

rustic nova
#

webhooks

brazen epoch
#

I'm assuming there's a documentation on it?

rustic nova
#

About webhooks, yeah

#

but you will need some coding experience for that

#

otherwise, there's bots that do something like this for you

vale garden
#

is there anyone here who uses tiny.db on py

#

plz ping me

#

i have a weird issue where the name of an element in a list changes to null a while after i change its name in the json file

#

it happens on random occasions and it is messing up my bot a lot

#

plz help

cyan mulch
#

Anyone help me how to code to set status of bot

rustic nova
pale vessel
#

If you mean dnd or online etc. it's setStatus() or setPresence()

proven ivy
#

message.author.send('test');
Gives me a warning cannot read property of null

earnest phoenix
#

hi

neon heart
#

message.author?

proven ivy
#

yeah

#

in on messsage

proven ivy
earnest phoenix
#

then that's the wrong line onwhich thr error occured

proven ivy
#

if i remove the line there is no error

earnest phoenix
#

uhh what

proven ivy
#

there is also :Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

earnest phoenix
#

send your code and full error on hastebin

proven ivy
#

sry, gota go

#

can you pls dm me so i can rply later?

earnest phoenix
pale vessel
#

n00ds

atomic vault
#

i have hosted my bot but when i on my pc then only it run's my bot how to make it 24/7 online

earnest phoenix
#

and also on is not a verb it's a preposition

proven ivy
#

that's the error

#

then it just says that i'll have problems in the future

#

@earnest phoenix

pale vessel
#

We all will

vale garden
#

lol

fathom nymph
#

hey So

#

I have this streaming status

#

but this is what happens

rustic nova
#

Can't be avoided

#

what do you need help with?

#

oh can't help you with js

rocky hearth
#

Try logging the object

fathom nymph
#

@earnest phoenix

#

its message.channel.send

rocky hearth
#

U sure its { image }?

fathom nymph
#

message.channel.send(embed)

#

its not setImage

#

Its setThumbnail

rocky hearth
#

Nah! setImage exists

fathom nymph
#

I Know

#

now its message.channel.send

#

broooooooo

#

change await to async

#

Bro!?!?!?

#

you dont need {}

naive kestrel
#

you really dont

fathom nymph
#

So Your Gonna Do It like

#

${{image}}

#

u dont need {}

rocky hearth
#

That is called object destructuring

fathom nymph
#

yea

naive kestrel
#

how not?

rocky hearth
#

He is trying to get link from the object

#

So {link} works fine

mighty quiver
#

Is anyone here free to help

#

I know nothing bout making bots

#

I've reached the developer portal

#

And created a bot

#

Thats it

#

Can anyone help me convert my python code into this bot thing pls?

#

Its no major coding in python...... only some if else statements and a few lines of the datetime library

graceful dock
#

? bruh

graceful dock
mighty quiver
#

-_-

#

Wdym

graceful dock
#

"convert my python code to this bot thing"

#

this has no sense

mighty quiver
#

English isnt my first language

graceful dock
#

mhh ok so to be able to interact with discord

#

with python

#

you need a wrapper of the discord api

mighty quiver
#

Ohk.....

graceful dock
#

and since you're using python, you can use discord.py

mighty quiver
#

Yea.....

#

I heard of that library

graceful dock
#

there is a small bot example

#
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='>')

@bot.command()
async def ping(ctx):
    await ctx.send('pong')

bot.run('token')
mighty quiver
#

Ohh

graceful dock
#

replace 'token' by the the token of the bot you've just created on the developer portal

mighty quiver
#

I've never used the async

graceful dock
#

then you should really learn about asynchronous

#

before using discordpy

solemn jolt
#

Why this code don't get me all bots?

const botssize = message.guild.members.cache
      .filter(m => m.user.bot)
      .map(m => `${i++} - <@${m.id}>`)
      .join("\n")
graceful dock
solemn jolt
#

Yes

graceful dock
#

Have you the server members intent ?

mighty quiver
graceful dock
#

its a privileged intent

mighty quiver
#

*put

solemn jolt
mighty quiver
#

I really need to learn

solemn jolt
#

My bot is verified

graceful dock
#

without that intent, over 100 servers, the cache will become messy

mighty quiver
#

I know nothing

graceful dock
#

verified means nothing, verified != having privileged intents

graceful dock
solemn jolt
#

But don't work?

mighty quiver
#

Like very basic things

#

If else, for while loops

#

So technically i know nothing

graceful dock
#

then you should really learn more about python before trying to make a bot with discord.py bruh

solemn jolt
#

How i can turn on intents on verify bot?

graceful dock
#

You need to request them

solemn jolt
#

For supporter?

graceful dock
#

join discord-developers server and check how to request privileged intents

solemn jolt
#

Ok

#

Thank you

mighty quiver
#

I used to play a game once.... it is in chinese so u will not understand, but i made a calculator for that game premium currency using python little bit knowledge that i have

graceful dock
#

mhh yea this is some basic programming

mighty quiver
#

Yes

graceful dock
#

learn about more advanced concepts, like classes, functions, decorators...

mighty quiver
#

I know how to def

#

Ok will learn classes

graceful dock
#

and decorators

mighty quiver
#

Yes

graceful dock
#

for example, this @bot.command is a decorator

mighty quiver
#

Ummm

#

So it modifies class?

#

Or function

graceful dock
#

function

#

like

#

lets say I want to have a function that acts like a bot command

mighty quiver
#

Yes

graceful dock
#

I'd need to decorate it with @bot.command

mighty quiver
#

Oo

wise quartz
#

How can i make a loop that runs a specific amount of times? (Py)

graceful dock
graceful dock
#

or

mighty quiver
wise quartz
#

Ty

graceful dock
#

i = 0
while i < amount:
i+=1

mighty quiver
#

Coz for loop run is n-1

wise quartz
#

for i in range(len(array)): works?

graceful dock
#

yes

wise quartz
#

Alr

#

Ty

mighty quiver
#

So decorator will make my function functional i guess

#

Lol

graceful dock
#

it's like a function that runs

#

when the function you decorated with it is called

mighty quiver
#

Ohhhh right

#

Yes we can def multiple functions inside one another

#

So that will be used

#

Im trying to understand

#

Ty larko

#

In the meantime is there something that just takes my code and spits out a bot lol

graceful dock
#

for example

lusty quest
#

there are GUI bot frameworks

#

like Discord bot Maker

graceful dock
#
def smart_divide(func):
    def inner(a, b):
        print("I am going to divide", a, "and", b)
        if b == 0:
            print("Whoops! cannot divide")
            return

        return func(a, b)
    return inner


@smart_divide
def divide(a, b):
    print(a/b)
pale vessel
#

what the fuck is that screenshot

graceful dock
#

this will output this

#
>>> divide(2,5)
I am going to divide 2 and 5
0.4

>>> divide(2,0)
I am going to divide 2 and 0
Whoops! cannot divide
mighty quiver
#

Ohhhh

broken sentinel
#

do you think something.host is good for my bot

#

?

graceful dock
#

and discord.py actually uses these decorators to register commands, events...

#

and you can also have multiple decorators decorating one function

#

so you need

lusty quest
#

@earnest phoenix store the message object of the embed

graceful dock
#

to reference msg.send

#

let message = await msg.send(embed)

lusty quest
#

^

graceful dock
#

and then do message.edit(editembed)

broken sentinel
#

Do you know site where i can host my discord.js bot 24/7 free

lusty quest
#

there are no good ones

broken sentinel
#

something.host ?

lusty quest
#

cheap alternative would be a raspberry pi or a NAS at home (if aviable)
never heard of them

cyan mulch
graceful dock
#

your screenshots are really cursed man

cyan mulch
#

lol

broken sentinel
#

i can see

#

the status

graceful dock
#

check the docs of your bot's lib to set a status like that

broken sentinel
#

My bot is with changing status

graceful dock
#

using discord.js I guess?

broken sentinel
#

Streamin {servers}

cyan mulch
graceful dock
#

bruh what?

broken sentinel
#

i use discord.js ;)

cyan mulch
#

glitch.vom

#

com

graceful dock
cyan mulch
#

it is

broken sentinel
#

its site

graceful dock
#

ok yes 👍

#

😂

graceful dock
broken sentinel
#

Yep i know i dont have problem

#

i am trying to help the guy with the status

rustic nova
#

get lightshot or snipping tool

broken sentinel
#

yep i can not see the status

#

to help him

graceful dock
#

oh I thought you were the one asking for help

broken sentinel
#

no

graceful dock
#

this man is lost, he doesnt even know what is a language/lib

broken sentinel
#

i have read the docs

#

i am in process if making my bot now

rustic nova
#

something like that

graceful dock
cyan mulch
#

yes

#

like that

broken sentinel
#

wow thats ugly ;)

earnest phoenix
#
    at RequestHandler.execute (/rbd/pnpm-volume/c6816d60-b989-4870-9a98-e134ec16d4cc/node_modules/.registry.npmjs.org/discord.js/12.5.0/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:88:5)
    at async RequestHandler.push (/rbd/pnpm-volume/c6816d60-b989-4870-9a98-e134ec16d4cc/node_modules/.registry.npmjs.org/discord.js/12.5.0/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
    at async GuildMemberRoleManager.remove (/rbd/pnpm-volume/c6816d60-b989-4870-9a98-e134ec16d4cc/node_modules/.registry.npmjs.org/discord.js/12.5.0/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:125:7)
(node:11860) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11860) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
graceful dock
#

we cannot help you without knowing the lib you're using

graceful dock
#

ok this is a joke bruh

broken sentinel
#

I prefer make something like Playing !help or Playing(number of server)

graceful dock
cyan mulch
#

no

broken sentinel
#

Bro tou kidding

#

?

graceful dock
#

he is trolling 100%

cyan mulch
#

const activities = [Giveaways in ${client.guilds.cache.size} guilds,"fg!help",over ${client.users.cache.size} users!];
setInterval(() => {
let activity = activities[Math.floor(Math.random() * activities.length)];
client.user.setActivity("G!help", { type: "PLAYING" });
}, 20000);

};

earnest phoenix
#
    at RequestHandler.execute (/rbd/pnpm-volume/c6816d60-b989-4870-9a98-e134ec16d4cc/node_modules/.registry.npmjs.org/discord.js/12.5.0/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:88:5)
    at async RequestHandler.push (/rbd/pnpm-volume/c6816d60-b989-4870-9a98-e134ec16d4cc/node_modules/.registry.npmjs.org/discord.js/12.5.0/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
    at async GuildMemberRoleManager.remove (/rbd/pnpm-volume/c6816d60-b989-4870-9a98-e134ec16d4cc/node_modules/.registry.npmjs.org/discord.js/12.5.0/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:125:7)
(node:11860) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11860) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
#

help me

broken sentinel
#

You use glitch for website where to code but what lenguage is your code

graceful dock
#

😂

cyan mulch
#

/why not understand?

broken sentinel
#

i give up

graceful dock
cyan mulch
#

u guys are so stupid

rustic nova
#

What?

graceful dock
#

probably a copied code from someone's bot

rustic nova
#

they're trying to help you

graceful dock
#

stfu we're trying to help you

#

fucking dumbass

cyan mulch
broken sentinel
pale vessel
graceful dock
#

someone kick this asshole from this server

rustic nova
#

They aren't able to help you though if you don't cooperate

#

No need to become aggresive

pale vessel
#

imagine being toxic when someone is trying to help you

#

Larko was so nice when he asked me for help

#

why don't you be like him

broken sentinel
marble juniper
#

imagine not being thankful for the fact that anyone even tries to help you in the first place

broken sentinel
#

Yep

#

we can ignore him

#

but we try to help

cyan mulch
#

do u think this is website code?

broken sentinel
#

bro

#

glitch is the website

graceful dock
#

you see the ready.js at the left of your screen

broken sentinel
#

like visual studio code

cyan mulch
#

discord.js is website

graceful dock
#

discord.js is a library. JS is a language

cyan mulch
broken sentinel
#

finally some progress

graceful dock
#

and you should learn about JS before using discord.js

cyan mulch
graceful dock
cyan mulch
#

okay

#

im using discord js

#

whats the code?

broken sentinel
#

you can read the docs for this

cyan mulch
#

how to use

broken sentinel
#

I have code for status but not the status you want

graceful dock
#
cyan mulch
#

where

#

is it totally running into botZ?

broken sentinel
#

@graceful dock who is your bot

#

?

graceful dock
#

Five

broken sentinel
#

how many commands does he have

graceful dock
#
// Set the client user's presence
client.user.setPresence({ activity: { name: 'with discord.js' }, status: 'idle' })
  .then(console.log)
  .catch(console.error);
``` here is a code snippet to set an activity
#

like ~120

#

the name of the activity is what is displayed on screen, the text

broken sentinel
#

@cyan mulch do you know what it mean when something is with //

pale vessel
#

it's a comment lol

cyan mulch
#

no?

graceful dock
#

and the status is like the "Playing" or "Watching"

broken sentinel
#

i know

cyan mulch
#

idk this stupid pp

#

app*

broken sentinel
#

but i am interested if he know

cyan mulch
#

okay

broken sentinel
#

@cyan mulch Have you ever study programming ?

cyan mulch
#

yes

#

i have a app

#

called

#

ntohing to see here

broken sentinel
#

ntohing?

cyan mulch
#

but the app i make is nsfw lmao

earnest phoenix
rustic nova
#

whatever your code is trying to do with roles, that specific role does not exist

cyan mulch
#

bruh

#

just

broken sentinel
#

who is testing the bot for approve ?

cyan mulch
#

give me the code of status

graceful dock
#

you can't just continue copy pasting code without knowing anything about programming mate

cyan mulch
#

oh

#

sorry

rustic nova
#

if you're unable to do that yet, come back to it once you have more experience

broken sentinel
cyan mulch
#

<@&585528734904352769>oh i can mention

#

wow

broken sentinel
#

Stop

#

mantion

cyan mulch
#

mantion

rustic nova
#

I see the unfortunate happen

cyan mulch
#

yes mantion

broken sentinel
#

I am not gonna give him the code

rustic nova
#

post your code then

rustic nova
#

stop mentioning

cyan mulch
#

did u get 1 ping?

#

tell me

rustic nova
#

no but stop

cyan mulch
#

now

earnest phoenix
#
let rolname = "⛔ | Cezalı Üye"; // BURAYA KULLANICININ TÜM ROLLERİ ALINDIKTAN SONRA VERİLECEK ROLÜN İDSİNİ YAZIN YAZMAZSANIZ TÜM ROLLERİ ALIR SADECE. 
///////////////////////////////////////////
exports.run = (client, message, args) => {
      if(!message.member.hasPermission("ADMINISTRATOR")) return message.reply(`:x: Bu komutu kullanabilmek için "\`Denetim Kaydını Görüntüle\`" yetkisine sahip olmalısın.`)
    let member = message.mentions.members.first() || message.guild.members.get(args[0]);
    if(!member) return message.channel.send("**Lütfen kullanıcıyı etiketleyiniz veya idsini yazınız.**");
    if(rolname.match(/(\d{17,19})/g)) {
        member.roles.cache.forEach(role => member.roles.remove(role));
        member.roles.add(rolname);
    }
    else member.roles.cache.forEach(role => member.roles.remove(role));
    return message.channel.send(`**Kullanıcının tüm rolleri ${rolname.match(/(\d{17,19})/g) ? `alınıp \`${message.guild.roles.cache.get(rolname).name}\` rolü verildi.**` : 'alındı.**'}`);
}
exports.conf = {
    enabled: true,
    guildOnly: true,
    aliases: [],
    permLevel: 4
};

exports.help = {
    name: "karantina",
    description: 'Birini jaillersiniz.',
    usage: 'jail <kullanıcı>'
};```
rustic nova
#

@small plume

earnest phoenix
#

@rustic nova

graceful dock
#

someone needs to ban this kid

cyan mulch
#

no u

#

ur even 6 y.o

broken sentinel
#

@cyan mulch spri se be shti eba mamata malko keleme takova.

cyan mulch
#

dw/sw/fdf/

#

f/

#

f

#

/f

#

/giphy d/s

#

d/s

#

f/sd

#

f/

#

df/

#

f/ew

earnest phoenix
#

?

rustic nova
#

Bruh

cyan mulch
#

d/

lusty quest
#

@tame kestrel we got a spamer

cyan mulch
#

/d

rustic nova
#

@coral trellis please

earnest phoenix
#

@cyan mulch stop spam

cyan mulch
#

swd/sd//s/s

#

/ds

#

/s//dd

#

d

#

d

#

d

#

d

#

d

earnest phoenix
#

pls spam stop!

cyan mulch
#

d

#

d

#

d

#

dd

#

d

#

d

#

d

summer torrent
#

@coral trellis

graceful dock
#

@lost berry ^

small plume
#

-b 691222873330810891 Spamming and toxic

gilded plankBOT
#

dblMod Banned Stitch#6611 (@cyan mulch)

earnest phoenix
#

@small plume thx

broken sentinel
#

gg

lusty quest
#

thx

rustic nova
#

thanks Hugs2Death

broken sentinel
earnest phoenix
#

Please tell me also toxic and spam @small plume

rustic nova
#

@earnest phoenix can't really help you, i only know how to partially read errors

#

No clue about js in general

lusty quest
#

what is the error?

broken sentinel
#

@earnest phoenix Turkish ?

summer torrent
#

@earnest phoenix you need to use role's id instead of name. Also please learn basic js. According to comments in this code, you dont know js

graceful dock
broken sentinel
#

How to get the badje that is on Kyoyu next to bot developer badje

lusty quest
#

left or right?

graceful dock
#

bright

summer torrent
#

@broken sentinel early supporter? You cant

rustic nova
#

oh wait nvm

lusty quest
#

well travel back in time when they introduced it

#

then get nitro

broken sentinel
#

i will travel :)

hollow rose
#

My bot send this

summer torrent
#

"Missing Permissions"

lusty quest
#

no permission to send messages i guess

summer torrent
#

or any another action

hollow rose
#

Ok

lusty quest
#

well you could get it by looking up the error code

earnest phoenix
broken sentinel
#

I am Bulgaria :)

hollow rose
#

Ok

broken sentinel
#

who is coding on notepad

#

he is a legend

lusty quest
broken sentinel
earnest phoenix
arctic summit
#

pog

earnest phoenix
#

Hi, i have a mysql server, i wanted to connect to it with nodejs
i configured the server cnf for remote connections
this is my code

#

i filled the host .... fields

pale vessel
#

Are you creating a db every time your bot starts

earnest phoenix
#

i get this error

#

it connect but error on query

graceful dock
#

Try establishing a pool

#

var db = require('mysql') .createPool({...});

#

So just replace your createConnection() by createPool()

old cliff
#

Anyway I could get all guilds a user is in ?

graceful dock
#

@old cliff You can only get the guilds that the bot shares with the user

old cliff
#

No other way ?

graceful dock
#

Nop

old cliff
#

Even with oauth?

graceful dock
#

Oh oauth yes

#

You can view a user's guilds

old cliff
#

But is implementing oauth for giveaway requirement checking worth it ?

broken sentinel
#

when you spell reson in your code in beginning and all the rest of your code dont work :(

#

thats sad moment

graceful dock
#

Mhh depending on your use case I think. Could be worth it if your bot is hosting important giveaways.

old cliff
#

Hmm then it wil be a good idea to generalize the oauth checking and storing that data and not only for 1 single giveaway

#

I'll implement that

graceful dock
#

Make sure to respect discord tos when dealing with this type of things

old cliff
#

Yeah

vale garden
#

hi

#

does anyone know a good way to change a specific element in a list in python, which is conncted to json

#

coz when i do

#
list = ["a", "b", "c"]
list[0] = "d"
#

it converts the changed value to null in json for some reason

vale garden
#

idk it just does that for some reason

graceful dock
#

An example ?

#

yes = {"ok":["yes0", "yes1"]}
yes["ok"][0] = "meow"
^ changing the yes0 to meow

vale garden
#

wait ig i fixed it

#

see i use tiny.db

#

and i messed up something there

#

lol

slender thistle
#

wtf

#

That wouldn't be an issue with Python, but whatever you used

#

That snippet is completely valid

lusty quest
#

he already got the issue and fixed it

slender thistle
#

I'm curious what the actual issue was and how they solved it tbh

lusty quest
#

would guess inserting the data in a different Schema to the DB and then experiencing the issues

agile lance
#

Im using js and I want to have it list all the roles in the embed and this is my code:

message.guild.roles.forEach(role => {
return role.name
})
}

let e = MessageEmbed()
.setTitle('Roles')
.addField('List', caller(), true)
message.reply(e)```

error: cannot read property of 'forEach' of underined
lusty quest
#

where did you define the message?

agile lance
#

client.on('message', async message)

#

at the beginning of my code

lusty quest
#

pass the message object into your function

agile lance
#

how?

lusty quest
#

did you know how to define functions?

agile lance
#

i defined it like this

#

function NAME() { // code }

#

i think its a issue with passing roles

hazy sparrow
#

is usertag a thing in d.js v12? im too lazy to check the docs

lusty quest
#
function caller(message){
console.log(message.guild.name)
}
agile lance
#

if it was the message it wouldve said "cannot read property of 'guild' of undefined "

lusty quest
#

also did you got the intends you need

agile lance
#

I do yes

hazy sparrow
#

oh okay

agile lance
#

like message.author.tag

#

or if youre getting a guild member like this

hazy sparrow
#

yeah ik how that works

agile lance
#

let k = message.guild.members.cache.get('id')

k.displayName

lusty quest
#

@agile lance you miss the cache for your loop

#

roles is a manager

agile lance
#

ahhh

#

let me put cache and see if it works

#

Works like a charm

earnest phoenix
#

i wanna create a bot that will help to view a particular game’s player stats

#

like...

lusty quest
#

make sure the game got a usable Public API to look them up

earnest phoenix
#

ohh

lusty quest
#

if there is none it makes it way harder to make such a bot

earnest phoenix
#

i have no idea whats that

misty sigil
#

then you make a request to it

#

and parse the data

earnest phoenix
#

is it possible with cod cold war?

lusty quest
#
API

An application programming interface (API) is a computing interface that defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc. It can also provide extension mechanisms so that users can ext...

misty sigil
#

if you don’t know how to code in js, py, or something else I’d recommend learning js

lusty quest
#

atleast its in the works

misty sigil
#

just because that’s generally one of the easier languages to make a bot in

earnest phoenix
#

ohh

misty sigil
#

you can use the node-fetch library to make your requests

earnest phoenix
#

actually i have 0 experience in all these stuffs

lusty quest
#

did you know any programing language?

earnest phoenix
#

nope

misty sigil
#

I don’t recommend making a bot then, to be honest.

earnest phoenix
#

😅

lusty quest
#

well this would be step 1

#

learn one language

earnest phoenix
#

ok

lusty quest
#

Javascript is easy to learn

earnest phoenix
#

which language would be easy

#

ok

misty sigil
#

JS

#

use NodeJS for the bot development

earnest phoenix
#

js or Javascript?

lusty quest
#

python is also easy to learn but it got some hickups

#

its the same

misty sigil
earnest phoenix
#

ok

lusty quest
#

js is short for javascript

misty sigil
#

JavaScript

earnest phoenix
#

do i need a pc for developing a bot?

lusty quest
#

makes it indefinitely easyer

misty sigil
#

yea you practically do

#

unless your willing to endure torture really

lusty quest
#

you can do it on a phone but it will become frustrating

misty sigil
#

coding on mobile is not fun

earnest phoenix
#

iPad?

misty sigil
#

still probably not ideal

#

you can’t run a good text editor on there such as Visual Studio Code

#

at least as far as I am aware

earnest phoenix
#

wait... imma ask my big bro to join in here.. he knows some coding language

delicate shore
#

Alright so

earnest phoenix
#

my brain is not strong enough for this LoL

delicate shore
#

How do I download songs from Spotify

#

Using my bot

lusty quest
#

you dont

delicate shore
#

And play them

#

Means ?

lusty quest
#

you stream them

delicate shore
#

Oh

earnest phoenix
#

thank you @misty sigil @lusty quest

delicate shore
#

How

earnest phoenix
#

one last queen

delicate shore
earnest phoenix
#

question*

delicate shore
#

And they allow scraping ?

earnest phoenix
#

how do i get the bot developer badge?

delicate shore
#

Because I'm not sure tbh

lusty quest
delicate shore
#

You can't get it anymore @earnest phoenix

earnest phoenix
#

oof

misty sigil
#

I’d reckon the best way to play Spotify songs is by using lavalink

delicate shore
#

Lavalink is tough af

misty sigil
#

not really

delicate shore
#

And I remember you taught me about mongoose (or MongoDB)
Thanks for that , now I use that only

misty sigil
#

no prob

#

what lib did you use for lavalink btw?

earnest phoenix
#

nvm do anyone know any bot that can show you the stats of a particular game?

misty sigil
#

or have you not tried it

delicate shore
#

I haven't tried

#

Looked at the docs

#

And fainted

lusty quest
#

dont look into the google api then

delicate shore
#

Maybe there is a lavalink wrapper on npm that I can use

misty sigil
#

hAh yea google api is something else

misty sigil
#

erela

delicate shore
#

Oh

#

I'm gonna see that , Thanks

misty sigil
earnest phoenix
#

do anyone know any bot that can show you the stats of a particular game?

misty sigil
#

specifically designed for discord bots

#

there should also be command examples

earnest phoenix
#

😑

delicate shore
#

Bruh , erela-discord is something else lmao
I thought they were same

misty sigil
#

I can get the docs for you too

eternal osprey
#

hey guys i think that i need some help. I made a !raids (pokemon name) (level) bot. However, i added the list of weather boosts, and since then it didn't work anymore. It doesn't show any errors nor problems in the console.

misty sigil
#

these might come in handy

delicate shore
#

Alr thanks

#

I need to download lavalink ?

#

On my vps

#

Or is there any online way or smth

#

Because I have 400 mb space left on my vps kek

misty sigil
#

yea you do need to setup Java 13 and download the lavalink jar

delicate shore
#

Alright

#

Thanks

brazen epoch
misty sigil
#

if you don’t wanna fill stuff in you don’t have to

#

I do recommend changing the password tho

rustic nova
pure lion
#

Are there any crates for mongo wrappers that aren't 4-5 years old for rust bongo

waxen obsidian
#

How can I do the message sending command when I vote for the bot

pure lion
#

use the dbl api

waxen obsidian
#

I couldn't. If anyone has such a code, can he / she throw it?

lusty quest
#

the dbl docs are pretty decent for the API

eternal osprey
#

hey guys

lusty quest
#

do they have an API?

eternal osprey
#

not sure

lusty quest
#

would be the easy way

eternal osprey
#

the two websites where i am pulling all my info from

#

can't i just scrape the weather boost text directly?

lusty quest
#

its the same website just 2 different api endpoints

#

api would be way easyer

#

writing a scraper is more complicated

eternal osprey
#

yeah they don't have a free to use api.

#

how would i scrape it tho?

lusty quest
#

then search one

#

there are many ways but it depends on what coding language you use

eternal osprey
#

javascript

#

it's a leaflet map btw

lusty quest
#

im not sure if you can scrape it this easy

eternal osprey
#

owh okay

sturdy vine
#

umm i wanted to ask that what to do when my dynos stop working on heroku?

pure lion
#

@sturdy vine stop using heroku

sturdy vine
#

ok

#

thanks

pure lion
#

Np

#

Any time

slender thistle
#

Either Heroku is having issues or your quota is exhausted

sturdy vine
#

my quota is exhausted

#

because i was using free dynos

#

I think I need to buy hobby dyno

slender thistle
#

And you don't have a credit card attached to your account?

sturdy vine
#

i am going to buy dyno

pure lion
#

So my bot has a message latency of 0 (written in serenity) and I'm not sure if it's actually got 0 ping or not. It compares the !ping message timestamp to the Pinging... message timestamp and then edits the Pinging... message with the new latency time in ms. I have checked the message IDs and they are indeed not the same message. Sometimes it's 1ms. Is this normal behaviour and I have 0 latency or is my coding bad?

lusty quest
#

dont buy a dyno. get something like a AWS VPS with 1 year free or a GOOGLE VPS with also 1 year free

sturdy vine
#

but heroku is only $7 / month

rustic nova
#

so is a vps

#

most vps i know of

lusty quest
#

Digitalocean is 5$/month

sturdy vine
#

:0

lusty quest
#

and way more reliable

rustic nova
#

private-hosting has like a 4-6€ vps

slender thistle
lusty quest
#

amazon AWS is around the same price range and with 1 year free

sturdy vine
#

digitalocean is better than heroku?

pure lion
#

Yeah

lusty quest
#

way better

sturdy vine
#

ohkk

slender thistle
#

I prefer to stay be the stance that Heroku is more of a testing environment for web applications

lusty quest
#

but you need to know some basic linux stuff

slender thistle
#

and DigitalOcean is more for, well, hosting projects in production

sturdy vine
#

:0

pure lion
lusty quest
#

how did you measure the ping?

pure lion
#

Not at my pc rn sifsbishgidbf

lusty quest
#

so command message created timestamp - message send timestamp

pure lion
#

first timestamp = user sends message => second timestamp = bot sends message => subtract => return latency

sturdy vine
#

for getting latency js const ping = Date.now() - message.createdTimestamp;

slender thistle
#

So in Python code, pretty much

time1 = time.time()
msg = await channel.send("Pinging...")
time2 = time.time()
await msg.edit(content=str(round(time2 - time1, 2)))
#

?

#

time.time() returns timestamps in float

pure lion
#

Ah I'll try getting a UTC date

#

Rust!

#

Also wouldn't the message sent timestamp function as the date/timestamp?

slender thistle
#

catshrug I don't rely on that

#

I use local timestamps instead

pure lion
#

Okay I'll take a look

#

I mean it does return both as UTC timestamps

lusty quest
#

why did you want t use utc? usually you get unix timestamps

pure lion
#

It is unix

#

Aaa

#

It derives the Unix timestamp from the UTC date

#

there's a timestamp method

earnest phoenix
#

hi

old cliff
#

Mongo vs mysql vs sqlite for my boat ?

rustic nova
#

mongo or mysql probably

old cliff
#

👌

pure lion
#

i found the code yaay

#
    let m_timestamp1 = msg.timestamp.timestamp();
    let m_timestamp2 = message.timestamp.timestamp();
    message.edit(ctx, |m| {
        m.content(format!("Pong in {}ms", m_timestamp1 - m_timestamp2))
    }).await?;
earnest phoenix
pure lion
#

@earnest phoenix don't.

#

not funny

earnest phoenix
pure lion
#

i boot el PC

earnest phoenix
#

also what the fuck is this: |m|

#

absolute value of integer?

honest perch
#

@slender thistle code highlights on mobile

honest perch
#

How? Its a feature

pure lion
#

like those found in arrow functions in js

earnest phoenix
#

link me an MDN page

earnest phoenix
misty sigil
#

it’s rust is it not?

honest perch
#

Now you have

misty sigil
#

oh idk

carmine summit
#

does .map() adds it? or replaces it?

earnest phoenix
#

how do i do like Phantom#0099 just voted!

#

?

rustic nova
earnest phoenix
#

pls tel me here

carmine summit
#
//returned object```
earnest phoenix
#

Help me

rustic nova
#

still

#

just read it

earnest phoenix
#

i didn't got

#

tel me here

#

pls

rustic nova
#

can't help you then, then you're not ready to do that yet

#

come back to it once you understand documentations

earnest phoenix
#

no, i m searching i didn't got

pure lion
#

so i tried to install the fetch crate but:
error: failed to run custom build command for openssl-sys-extras v0.7.14

rustic nova