#development

1 messages · Page 1286 of 1

earnest phoenix
#

have you tried not copypasting

#

and instead you know

umbral zealot
#

Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:

  • proper syntax
  • debuging code
  • basic features (vars, arrays, objects, functions)
  • read and understand docs
  • nodejs module system

As much as we'd like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.

Here are good resources to learn both Javascript and NodeJS:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie's Accelerated JS: https://js.evie.dev/

Please take a couple of weeks/months to get acquainted with the language before trying to make bots!
jsfirstbotlater learnjs

earnest phoenix
#

oml

#

ok

#

thanks

copper cradle
#

why do people even try to start a proyect without knowing the language

earnest phoenix
#

;W;

umbral zealot
#

Because they think it's easy.

earnest phoenix
#

i knOw pHyToN bEtTeR buT iDk hOW to MaKe boTs WitH it

copper cradle
#

you clearly don't

earnest phoenix
#

Ik

#

you didn't spell python properly

#

Ik

#

I foRgOt a H

#

wTh

copper cradle
#

they told you: close your message listener
you said: my what

umbral zealot
#

phyton. lol.

copper cradle
#

phy

earnest phoenix
#

ree

#

AiGht Cya

copper cradle
#

kk

umbral zealot
#

If you don't know how to google for simple questions, it's gonna be hard being a dev

#

because "python discord bot" would 100% show you a python library

copper cradle
#

they're gone

earnest phoenix
#

wot

#

im Here

copper cradle
#

oh

earnest phoenix
#

stoP assuming

copper cradle
#

oml

sudden geyser
#

why do people even try to start a proyect without knowing the language
@copper cradle because they think it'll be fun but it's more like submitting an application but not knowing the conditions and requirements

copper cradle
#

lmao

sudden geyser
#

like come on, those tv shows where the main character signs a contract without reading any of it should be enough

earnest phoenix
#

i like to think of it as mommy dependency

#

"mommy do it for me" shows when someone's a help vampire

umbral zealot
#

Tylers are the worst

#

Don't be a Tyler.
A Tyler: "Karen's kid, the child that's been indulged his whole life, pampered, doesn't know the meaning of 'no' and has a hard time learning anything because they've always been spoonfed from birth."
Typical "Tyler" Behaviour includes:

  • "But I just need help with this one thing"
  • "I don't have time to learn"
  • "I'm just following a tutorial, and it doesn't work when I copy the code"
  • "What do you mean I need to learn JS? I know JS, I've been doing it for 10 minutes!"
sudden geyser
#

The real issue with stuff like youtube videos and guides on how to build bots without knowing the language is it teaches you to write code in only one way.

copper cradle
#

yes

faint prism
#

Tyler
I just call them skids

umbral zealot
#

those are a different breed 😛

copper cradle
#

idk

faint prism
#

Eh, I mean it's still copying/using other peoples code

#

Granted, it's more of a haxzor term

last bloom
#

Does anyone know how to use a bot to block a specific word from being used in a server?

faint prism
#

how to use a bot
@last bloom I'm sure the person who made it has a help command

earnest phoenix
#

Check if the content includes that word

#

don't bother with word filters

#

they're never effective (on discord)

#

(this statement excludes ML magic)

copper cradle
#

®

cinder patio
#

I've got this regex to match anything after @ and until it hits an empty space, /@(.([^\s]+)*)/, however, I don't want /@(.([^\s]+)*)/.test("@somestring ") to return true, because there are empty spaces following the mention

copper cradle
#

$

cinder patio
#

I also don't want to match it if there are empty spaces after

copper cradle
#

then I'm not sure

cinder patio
#

I could use test first to check if it returns true, and then use match

#

But that's kinda inefficient

earnest phoenix
#

i knOw pHyToN bEtTeR buT iDk hOW to MaKe boTs WitH it
@ivory nimbus LOL

#

ik 23 programming languages

#

😎

#

nobody asked

violet mesa
#

discord.py
how do i change bot status to "watching (amount of servers the bot is in)"???

earnest phoenix
#

nobody asked
@earnest phoenix mad

#

😦

violet mesa
#

we didnt ask but if no one would of asked ever anything there would of never been convos

#

so thats how convo's work

#

bud

earnest phoenix
violet mesa
#

looonng

#

lol

earnest phoenix
#

bud
@violet mesa me?

violet mesa
#

no

violet mesa
#

i mean cty

#

thx

earnest phoenix
#

js html and py are ass

violet mesa
#

py is ok

#

html isnt a coding lang

#

and

trim saddle
#

@earnest phoenix wdyn html is ass

violet mesa
#

js sucks

trim saddle
#

the internet wouldn't exist with html

earnest phoenix
#

Pascal Script best

violet mesa
#

it would

trim saddle
#

@violet mesa no language sucks, except lua

earnest phoenix
#

WDYM

violet mesa
#

just with dif lang

earnest phoenix
#

U GOT LIKE 132 program languages

flint yew
#

Why top.gg not sending who voted is there something wrong or what xd I am sure added the correct api

earnest phoenix
#

the internet wouldn't exist with html
@trim saddle LOL

#

its still ass mg

valid frigate
#

text/plain moment

earnest phoenix
#

the internet wouldn't exist with html
@trim saddle im taking a guess you never took CS and never learned about the creation of the web

trim saddle
#

well i mean

#

the internet would exist

delicate zephyr
#

i got told to look here?

earnest phoenix
#

end of this year ill know atleast 40 programming languages

violet mesa
#

cs and html arnt code langs just saying

earnest phoenix
#

CS is a class

#

lol

violet mesa
#

true

earnest phoenix
#

nobody ever implied it's a language

misty sigil
#

did you mean: css

trim saddle
#

someone stsrted a language war about html comparing it to py and js

earnest phoenix
#

Pascal Script is best

delicate zephyr
#

tell them to read the rules

#

¯_(ツ)_/¯

violet mesa
#

did you mean: css
true aswell but no

misty sigil
#

someone stsrted a language war about html comparing it to py and js
@trim saddle dude be fuckin comparing a clock to a computer

#

or some shit idk

thick gull
#

stop throwing a fit over programmer preference

earnest phoenix
#

small brain

violet mesa
#

lol

earnest phoenix
#

i just noticed was chatting in development

#

D:

hexed latch
#

@delicate zephyr u a bot dev?

earnest phoenix
#

@spice willow

#

@red linden

#

@shell echo

sinful belfry
#

what are you doing

earnest phoenix
#

@weary crowgroupfinder

violet mesa
#
import random

s = ["", "REEEEEE", "html is not a lang(say it again)", "ok"]
print(random.choice(s))
hexed latch
#

xD

earnest phoenix
#
-no
violet mesa
#

ok

hexed latch
#

L

#

🤡

violet mesa
#

it chose ok

trim saddle
#

@sinful belfry can we like get a mute in the chat

sinful belfry
earnest phoenix
sinful belfry
#

yeah if it continues

earnest phoenix
#

@open frost ass developer

hexed latch
#

@trim saddle u a bot dev?

sinful belfry
#

ffs

trim saddle
#

yeah, i run 3 bots

violet mesa
#

discord.py
how do i change bot status to "watching (amount of servers the bot is in)"???
links dont answer my questions im to dumb to understand

delicate zephyr
#

also Skull

#

next time you see a lang war

#

ping a fricken mod

#

instead of me

#

ffs

violet mesa
#

can anyone help pls

misty sigil
earnest phoenix
#

links do answer your questions because they're links to docs which explain what you need to do very well

misty sigil
#

cry literally answered you

#

links do answer your questions because they’re links to docs which explain what you need to do very well
@earnest phoenix THIS

violet mesa
#

yes but i said im to dumb to understand

#

;-;

earnest phoenix
#

that's a you problem

violet mesa
#

pls just say what i need to type ;-;

misty sigil
#

you aren’t a programmer until you can read docs imo

#

pls just say what i need to type ;-;
@violet mesa spoonfeed

violet mesa
#

ok

#

i shall now read

#

;-;

#

i dont like reading

#

i only read stackoverflow

earnest phoenix
#

and i don't like cleaning but yet i have to

#

sucks to be alive

misty sigil
#

yea

violet mesa
#
game = discord.Game("with the API")
await client.change_presence(status=discord.Status.idle, activity=game)

if i change discord.Game to discord.Watch work?

earnest phoenix
#

read the text under shiny colorful code blocks

drifting wedge
#

So I got a domain and using cpanel

#

How do I like link the domain to the website?

#

Like do I use cloud flare?

misty sigil
#

Yea

#

you don’t have to

drifting wedge
#

I tried

misty sigil
#

but I recommend it saved my ass once

drifting wedge
#

What else can I use?

misty sigil
#

Just link it

drifting wedge
#

but I recommend it saved my ass once
@misty sigil how?

misty sigil
#

DDoSed

drifting wedge
#

Like I’ve been trying for days

autumn aspen
#

lol guys I made a suggestion channel

drifting wedge
#

Like for example

misty sigil
#

Change the ns on your domain

drifting wedge
#

I put the cloud flare and it works

#

But on my website

#

What domain do I make it?

opal plank
#

anything that isnt xyz is fair game

misty sigil
opal plank
#

ive personally encountered quite a few websites that dont accept xyz

drifting wedge
#

anything that isnt xyz is fair game
@opal plank no like I have the domain

opal plank
#

lots of scam companies use them due to price

misty sigil
#

fuck scam companies then

drifting wedge
#

Just like in my website, what domain do I put it as to work with cloud flare?

opal plank
#

where is the main server hosted at?

#

wdym what domain?

drifting wedge
#

Do I put like the domain I bought?

opal plank
#

its 1 domain that fowards traffic to one ip

#

thats it

#

domain => couldflare protection/ray scan => ip

#

thats the general gist

#

im assuming you using cloudflare

#

im a bit drunk and didnt bother reading the rest

violet mesa
#

sorry to interapt your stuff
@earnest phoenix what am i suppose to do with len()

#

i know about len

earnest phoenix
#

it's for counting your guilds

violet mesa
#

is the amount of servers a list?

earnest phoenix
#

yes

violet mesa
#

uh ok

#

whats the lists name

earnest phoenix
#

i sent you the link to the docs

violet mesa
#

oh

#

didnt see

#

1 sec

drowsy kite
#

how do i make a command that bot will go to internet and share the info

sudden geyser
#

make an http request. what language are you using

earnest phoenix
#

hack into the mainframe.

violet mesa
#

lol

sudden geyser
#

free internet

earnest phoenix
violet mesa
#

take code for google and use the search engine to search it

#

now this is big brain time

#

loll

#

what lang is that suppose to be

faint prism
#

C

earnest phoenix
#

it's the linux kernel src i think

violet mesa
#

uh

#

thats why it makes no sense

#

lmaoooo

faint prism
#

It's C lang though

#

Since it was meant to be portable 🙂

violet mesa
#

thats why it makes no sense
my point still stands

sudden geyser
#

good ol c minor

#

you can learn c eventually

violet mesa
#

eventually

drifting wedge
#

So a friend is hosting the site

#

And he sent me some name servers

light vortex
#

How i can do my bot leave servers with -5 users in discord.js?

#

With eval command

drifting wedge
#

I’m using the GitHub student student domain

#

Do I link it to his name servers?

earnest phoenix
#

how do i make it so it tells me only the amount of humans in the discord

#

ive been trying to look for it

#

how do i make it so it tells me only the amount of humans in the discord
@earnest phoenix in what library

#

discord.js

light vortex
#

@earnest phoenix i still dont know, can you help a little more please?

violet mesa
#

@earnest phoenix i cant find the name of the thingy

#

cry is the smort boi/girl

#

no asuming genders

earnest phoenix
#
#

@earnest phoenix i still dont know, can you help a little more please?
@light vortex what do you not understand

#

@earnest phoenix i cant find the name of the thingy
@violet mesa
what thingy

#

oh

#

guilds

violet mesa
#

yes

light vortex
#

i found this from a friend

violet mesa
#

the name of amount of server list

#

thx!

earnest phoenix
#

@light vortex i asked you what do you not understand, not what you found

light vortex
#

I dont understand where do i put the guild members needed to leave

earnest phoenix
#

i explained it

#

re-read my message

light vortex
#

I wanna have code but

#

Uh

misty sigil
#

spoonfeed much?

#

god damn just learn to read docs

#

i do it in my free time KEK

light vortex
#

Its more hard for me in mobile

#

Since i Lost my pc

violet mesa
#

there is only message emoji guild abc.PrivateChannel VoiceProtocol

earnest phoenix
#

MEGALUL Mobile talk?

#

i do it in my free time :KEK:
@misty sigil i thought i was the only one lol, i like to scroll through material-ui docs to see what i could implement into my app next

#

Looking through docs is kinda fun when bored

violet mesa
#

there is only message emoji guild abc.PrivateChannel VoiceProtocol
@earnest phoenix pls

valid frigate
#

what is the difference between iana and icann

earnest phoenix
#

@violet mesa i understood none of that

violet mesa
#

i didnt find the name of the amount of servers list

#

thingy

earnest phoenix
#

i literally sent the url to it?

#

you use len on it to get the amount

light vortex
#

This is my first time asking for codes

#

Lmao

earnest phoenix
#

good for you

violet mesa
#

there is only message emoji guild abc.PrivateChannel VoiceProtocol
@violet mesa in the link u sent me i see only these things

earnest phoenix
#

i cringe everytime someone says "codes"

violet mesa
#

lol

light vortex
#

codes

earnest phoenix
#

@violet mesa you don't even need to open the url to understand what you need to do

#

the hrefs have the class where the prop is located in

violet mesa
#

discord.Client.guilds?

earnest phoenix
#

yes

violet mesa
#

OMG

#

ok

#

bruh

thick gull
#

i cringe everytime someone says "codes"
@earnest phoenix i do codes for funs

#

i do it in my free time KEK
@misty sigil stop exposing me

#

i was liter ally looking at docs rather than doing homework

violet mesa
#

@earnest phoenix where do i put it btw like in a @bot.command or like a bot.event

earnest phoenix
#

what is it in this context

#

ok then

violet mesa
#

by it i mean

game = discord.Game("on")
await client.change_presence(status=len(discord.Client.guilds), activity=game)
sonic lodge
#

i have a function that will update a user's entry in my bot's mysql database; it looks like this

return this.query(`UPDATE ${table} SET ${property} = '${value}' WHERE id = '${id}'`).then(function(results) {
    if (results.affectedRows === 0) {
        return self.query(`INSERT INTO ${table} (id, ${property}) VALUES ('${id}', '${value}')`);
    } else {
        return results;
    }
});```
even with the `results.affectedRows === 0` check in place, i keep getting random "duplicate key error"s on the next line? shouldn't that not happen
earnest phoenix
#

i mean, put it wherever you want @violet mesa

#

put it where you want it to change the activity

violet mesa
#

i get an error

#

it says

#

that i cant put it(it = to the same thing that it did last time) outside of a function

valid frigate
#

bruh

sonic lodge
#

you can only use it inside a function

#

*an async function

earnest phoenix
#

async* function

violet mesa
#

um

#

um

earnest phoenix
#

google your error and you're going to find out why you're getting it

violet mesa
#

should i put it in a ```py
@bot.event
async def on_start():
game = discord.Game("on")
await client.change_presence(status=len(discord.Client.guilds), activity=game)

#

like that

earnest phoenix
#

i don't know python, try it and see

violet mesa
#

okie

#

brb

#

i have to use my server

#

nope it dont work

#

1 sec

#

i bet its not on_start

#

me read logs

#

@celest crest why is ur name in hebrew and שלום

#

lol

celest crest
#

Somebody can give me reaction roles code on java script?

#

@celest crest why is ur name in hebrew and שלום
@violet mesa Because i want

sonic lodge
#

we don't do spoonfeeding here

violet mesa
#

ok

thick gull
#

bad

celest crest
#

🍴

sonic lodge
#

has someone made the "we don't do that here" meme with "spoonfeeding"

thick gull
#

discord out here sending the wrong emotes

#

no spoonfeed

violet mesa
#

@earnest phoenix its on_redy

#

lol

#

ready

celest crest
#

Somebody can give me reaction roles code on java script?
@celest crest please?

earnest phoenix
#

@violet mesa i thought so but i wasn't sure so i didn't say anything lol

violet mesa
#

lol

earnest phoenix
#

discord.Client is your instance of the client

#

not straight up discord.Client

slender thistle
#

lalala you need an instance of that class and not the class itself

violet mesa
#

oh

#

llol

#

umm

#

idk what the frick that means

#

lol

#

as i saied im stoopid

slender thistle
#

what variable is your bot object stored under

violet mesa
#

bot

#

do i use bot

earnest phoenix
#

OOP basics blobsweat

slender thistle
#

yes

violet mesa
#

lol

#

ok

bitter geode
#

Why is my bot reporting this error

UnhandledPromiseRejectionWarning: Error: 503 Backend fetch failed
earnest phoenix
#

5xx errors aren't your fault

slender thistle
#

Why is the API you are using reporting that error

violet mesa
#

sorry im just stoopid

earnest phoenix
#

if you get 5xx errors the best you can do is just sit and wait (and possibly have a breakdown while doing so, whatever you prefer)

violet mesa
#

mhm

#

again im stoopid

slender thistle
#

did you do discord.bot.guilds

#

or just bot.guilds

earnest phoenix
#

look at the start of your line, you're using your client instance already

slender thistle
#

I strongly advise you to go through principles of OOP itself

violet mesa
#

lol

slender thistle
#

uhh

#

cry

violet mesa
#

i did discord.bot.guilds

slender thistle
#
@bot.event
async def on_start():
    game = discord.Game("on")
    await client.change_presence(status=len(discord.Client.guilds), activity=game)

this tells me two things

#

actually, three

violet mesa
#

i

#

no

#

am

#

ik

#

what it tells u

#

donut

#

is

eternal osprey
#

hey

violet mesa
#

stoopid

slender thistle
#

either you're using bot and trying to set activity of client or vice versa

eternal osprey
#

how would i make a command that removes a line from a .json file?

last bloom
#

does anyone know if theres a way to edit roles that have already been published?

eternal osprey
#
    fs.writeFileSync("./data.json", [message.channel.id])
  }```
slender thistle
#

and the fact that you have both client and bot defined is sus

violet mesa
#
@bot.event
async def on_ready():
  game = discord.Game("on")
  await client.change_presence(status=len(discord.bot.guilds), activity=game)
```this is what it looks like now
earnest phoenix
#

stop using json as your database

eternal osprey
#

it is only 1 channel

slender thistle
#

it's bot not discord.bot

#

use bot not client

eternal osprey
#

for only 1 guild

#

i mean, what could go wrong.

#

i am only saving 1 channel id.

#

but how would i make a command that removes this line for example?

#

using fs

umbral zealot
#

why not just delete the file

#

¯_(ツ)_/¯

violet mesa
#

nvm

eternal osprey
#

cuz then it can't save it anymore

violet mesa
#

i fixed

#

it

#

thx

eternal osprey
#

i want to !channelset

slender thistle
#

writeFile(filehere, "")

eternal osprey
#

and !removechannel

#

okay lovely!

violet mesa
earnest phoenix
#

oh my god

violet mesa
#
@bot.event
async def on_ready():
  game = discord.Game("on")
  await bot.change_presence(status=len(discord.bot.guilds), activity=game)
violet mesa
#

uh

#

ok

#

didnt see the message

eternal osprey
#

also, i have a interval command. How do i actually stop it with a command?

#

i tried to define a variable to the setinterval

slender thistle
#

P.S. discord.bot gets bot property of the module discord

eternal osprey
#

and then use clearinterval(var)

#

but it kept on going

slender thistle
#

and you only need a plain variable bot, not a property of anything

violet mesa
#

it wotks now

#

i think

earnest phoenix
#

it covers what namespaces, classes and class instances (objects) are

violet mesa
#

its says playing on

#

thats it

earnest phoenix
#

because you set the string to on

violet mesa
#

thats not the prob

earnest phoenix
#

yes it is

violet mesa
#

the prob is that it doesnt say the number

earnest phoenix
#

yes

violet mesa
#

1 sec

earnest phoenix
#

and that's because you set the string to on

violet mesa
#

uh

earnest phoenix
#

re-read the change_presence docs

#

status is the status of the client, not the string to display

eternal osprey
#
  var testing = setInterval(() => {
        generateEmbedFromFeed(args, (embed) => {
          messageToEdit.edit(embed)
        })
      }, 5000);
    }
  }
  if (message.content.startsWith(prefix + 'removefeed')) {
    clearInterval(testing);
    message.channel.send("Interval feed has been stopped!")
  }
  ``` why is this not working guys?
violet mesa
#
@bot.event
async def on_ready():
  game = discord.Game("on" + len(bot.guilds) + "servers")
  await bot.change_presence(status=len(bot.guilds), activity=game)
``` are u proud of me and mad at me at the same time
#

?

earnest phoenix
#

pretty much yes

eternal osprey
#

what the fuck @violet mesa

earnest phoenix
#

lol

violet mesa
#

lol

#

more of the mad side tho

slender thistle
#

dear lord

#

use f-strings

#

thank you

earnest phoenix
#

i'm mad because you won't read what you're being told

slender thistle
#

That's an error for string + integer

#

avoid those by using .format or f-strings, thanks

violet mesa
#

I only read stackover flow

eternal osprey
#

to who are you talking exactly?

slender thistle
#

looks better and less errors and more performant

misty sigil
#

stackover flow

#

omg

#

why not stack overflow

#

or stackoverflow

earnest phoenix
#

because it's an overflow mmLol

slender thistle
#

your mom is memory overflow ngl

earnest phoenix
#

my mom is chrome? :(

slender thistle
#

Truth hurts bro :(

eternal osprey
#

what

#

but ehh

#
var testing = setInterval(() => {
        generateEmbedFromFeed(args, (embed) => {
          messageToEdit.edit(embed)
        })
      }, 5000);
    }
  }
  if (message.content.startsWith(prefix + 'removefeed')) {
    clearInterval(testing);
    message.channel.send("Interval feed has been stopped!")
  }
#

the annoying guy is back

earnest phoenix
#

no, we don't know why it's not working

#

debug your code

eternal osprey
#

you think that i haven't done that

earnest phoenix
#

not properly, no

eternal osprey
#

no errors or whatsoever.

#

yeah i have.

earnest phoenix
#

that's a contradictive statement lol, if you had debugged properly you would've found the root of the problem

slender thistle
#

put random console.logs here and there

#

see what exactly isn't working

earnest phoenix
#

that's like getting the wrong answer in maths and then saying that you did all the steps properly

#

when you clearly did not, because you got the wrong answer

slender thistle
#

Jokes on you, I get my answers right away

earnest phoenix
#

photomath mmLol

eternal osprey
#

why are you bringing back the bad memories

slender thistle
#

😂

violet mesa
#

tysm @earnest phoenix and @slender thistle im sorry for the hastle!!! i shall now shut

earnest phoenix
#

photomath is useless for higher level maths or when you start working with something like logarithms because you need to know which rules to apply

violet mesa
#

this is final code if anyone needs even tho no one needs code from me lmao

@bot.event
async def on_ready():
  game = discord.Game("on " + str(len(bot.guilds)) + " servers")
  await bot.change_presence(status=len(bot.guilds), activity=game)
#

idk what status= needs to be lol so i left it as that

earnest phoenix
#

i sent you a link to what it's supposed to be

#

leave it unset if you don't want to change it

#

ergo remove it from your code

slender thistle
#

I'm really surprised d.py doesn't straight up error out for that

misty sigil
#

no discord's api just gets really fucking confused

#

yo wtf u mean by 2 as your status

sonic lodge
#

lol "i'm currently number 2-ing"

earnest phoenix
#

tmi

sonic lodge
#

👀

wanton mural
faint prism
#

uh

opal plank
#

yeah 100% downloading that

faint prism
#

I did

opal plank
#

executing as admin too to make sure

faint prism
#

Just to check the magic file header is actually a JFIF encoding

wanton mural
#

ok

opal plank
#

account that is one month old

#

posting random files in chat

faint prism
#

really low quality animu pic

opal plank
#

yeah, 100% trustworthy

faint prism
wanton mural
sonic lodge
#

wrong place

earnest phoenix
#

please take your fetish for cartoon characters elsewhere

wanton mural
#

fetish?

opal plank
#

ANYWAY

faint prism
#

yeah

opal plank
misty sigil
#

lmao

opal plank
#

opening these files in ms Paint is some insanely high IQ shit

wanton mural
#

ok

opal plank
#

i didnt even know jfif was a valid extension

faint prism
#

I'm not going to try and execute it if that's what you mean by low-iq

opal plank
#

its just weird to use MS Paint out of all the available apps out there

earnest phoenix
#

hxd gang

faint prism
#

To prevent user error I clicked edit instead of open mmLol

livid moat
#

Ok

wanton mural
#

what is error code 403

faint prism
#

Usually because you have incorrect authentication

wanton mural
#

ok it on the website i click a bot and it said that

faint prism
#

what website are you talking about

wanton mural
faint prism
#

It's not approved yet

wanton mural
#

oh

faint prism
#

Only the bot's developer can see it until it's approved

#

hince the authentication error

wanton mural
#

oh the owner if the bot said it be up in 5 weeks

faint prism
#

Sounds about right

opal plank
#

^^

#

6+ last time i said 5

#

i dont remember who corrected me

#

but it should be roughly 5-6 weeks

wanton mural
#

The owner of the bot is very nice

shy turret
karmic compass
#

how can i make a randomizer in java?

#

with a switch/case statement

#

nvm

earnest phoenix
#

what

thick gull
#

just

#

?

shy turret
#

how do you get the reactions on an msg djs

earnest phoenix
#

<message>.reactions

shy turret
#

bruh

wicked sphinx
#

how do i play a kahoot game?

thick gull
#

.. ?

earnest phoenix
#
dbl.postStats({ serverCount: guilds, shardCount: client.options.shardCount });

-> invalid shard_count

next escarp
#

I was going to ask you something, and I'm going to approve my bot, but is it safe to give you this information????

earnest phoenix
#

@earnest phoenix

#

so i neccessay need to also send the shardId?

#

Yes

#

ok I have one more different question

#

?

#

when i try to do pm2 start file.py on my ubuntu 20.04 -> Interpreter python is NOT AVAILABLE in PATH. (type 'which python' to double check.)

sudden geyser
#

do you have the python interpreter in your PATH variable

timber cloak
#

i switched from botghost to bdfd and the difference is amazing

earnest phoenix
#

do you have the python interpreter in your PATH variable
no, how do i do that

timber cloak
sudden geyser
#

@earnest phoenix You add it to the path (PATH=$path:/path/to/python/thing). See this stackoverflow post as there are a lot of ways you could set it: https://stackoverflow.com/a/26962251

earnest phoenix
#

thanks bro

stark abyss
#

😳

earnest phoenix
#

?

green kestrel
#

🥴

#

^ my head

#

finally getting somewhere though, we've narrowed it down to a library issue, a missing mutex lock

slender thistle
#

geez

unique patio
#

There's easier ways to debug 😮

earnest phoenix
#

Not in his case

#
print(f"[{foo}] hello world")
                           ^
SyntaxError: invalid syntax
slender thistle
#

What's your Python version?

earnest phoenix
#
 python --version
Python 2.7.18rc1
#

i made an emoji list. if the length is more than 1024. will create the page.
but I couldn't split emojis. what should I do?

let emojiks = `${message.guild.emojis.cache.map(emoji => emoji).join(' ')}`;

.setDescription(`${emojiks.slice(0,1024)}`)

.setDescription(`${emojiks.slice(1024,2048)}`)
slender thistle
#

f-strings are exclusively Python3.6+ thing

earnest phoenix
#

how do I update it

#

on linux

opal plank
#

trying to grab an annoying bug on my cache

#

i might try exposing a debugger on a random port and try to use chrome to debug it

#

debugging shit in ubuntu is the worst

#

no VSC = bpd_aquaCry

earnest phoenix
#

@earnest phoenix Just make it show specific amount of emojis in every embed so it won't get cut off like that

#

how can i adjust the amount

unkempt ocean
#

I'm trying to get some text from html. whic package do you prefer?

earnest phoenix
#

@earnest phoenix

#

Amount of?

unkempt ocean
#

using chowdown rn

earnest phoenix
#

no VSC = :bpd_aquaCry:
@opal plank you do have vsc on ubuntu

#

snap has it

green kestrel
#

no VSC = :bpd_aquaCry:
@opal plank wait uh.... vsc? whats up with just vim? 😄

earnest phoenix
#
3|app-name | Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=...
#

I run this with pm2

#

But I can't figure out how to insert the key.

opal plank
#

@green kestrel does VIM have a debugger like VSC? havent used vim at all

#

@earnest phoenix its more about the debugger. node has the ability to expose debugger by itself, its just that VSC makes it awfully easy to do stuff

foggy anvil
#

h

karmic compass
#

is there a java equivalent of ```js
${variable}

sonic lodge
#

template literals?

thick gull
#

i think he means a var inside of a string

earnest phoenix
#

Is this channel is sharing your code?

thick gull
#

without ' e ' + var + 'e'

#

no spoonfeed

shy turret
#

When I use: (discord.js)

msg.awaitReactions(filter, { 
    max: null, 
    time: time, 
    errors: ['time'] 
}).then(async collected => {
});

I keep getting this error but it doesn't actually stop the filter. It is just annoying and spams the console.

(node:11944) UnhandledPromiseRejectionWarning: #<Collection>
(node:11944) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
slender thistle
#

see channel topic

thick gull
#

.catch()

#

?

earnest phoenix
#

Nvm

shy turret
#

@thick gull still gives error

thick gull
#

m

earnest phoenix
#

who here good with

#

go lang

sonic lodge
#

@karmic compass there's String.format() if that's what you're looking for, although it isn't as neat as js

shy turret
#

adding try{}catch(){} doesnt even do it/ignore the error

sonic lodge
#

try catch won't catch rejected promises

#

you need to use .catch() instead

shy turret
#

i did

#

i didnt work

sonic lodge
#

are you sure the error is coming from that line

shy turret
#

yes

#

waot

blazing portal
#

But you need to add a .catch. Can you show us how it looked like with it?

shy turret
#

wait

#
                                        msg.awaitReactions(filter, { 
                                            max: null, 
                                            time: time, 
                                            errors: ['time'] 
                                        }).then(async collected => {
                                        }).catch();

this?

thick gull
blazing portal
#

well you actually need to do something when you catch an error

shy turret
#

kk

#

.catch(err => {}); hehe

#

nice

#

works but what was that error all about

#

it occured after the "time" was done

blazing portal
#

The error was about the time running out, but you not doing anything with that error

shy turret
#

kk

#

oh so the error occurs if the "max" didnt happen?

sonic lodge
#

probably

blazing portal
#

no

#

when the time runs out

sonic lodge
#

it rejects with the collected reactions, which is kind of weirdo

lyric harness
#

hi everyone

blazing portal
#

you specifically set it up that way... errors: ['time'],

sonic lodge
#

oh i read it as "if the 'max' didn't happen in time"

blazing portal
#

well yeah if max didnt happen before time ran out, thats the errir

earnest phoenix
#

Do a try catch to catch the error and see what the actual error is

shell salmon
#

can anyone help me add commands to a bot i made

forest drift
#

how would i constantly disconnect someone from a voice channel based on their id and the voice channel id?

viscid goblet
#

i ran through my apps folder and found my old project that i worked on in like april
its called Anarchy Server Maker Bot Maker (ASMBM for short)

sudden geyser
#

@forest drift what library

#

also why not just deny them permission to join the channel

forest drift
#

Discord.js

#

also why not just deny them permission to join the channel
@sudden geyser it's for a troll bot I've been asked to make for my friend

hasty mulch
#

Is it possible to print an argument in Python?

slender thistle
#

uhhhhhhhh

#

uhhhhhhhhhhhhhhhh

#

yeah?

dire obsidian
#

well hi

#

i have a little question related with python

slender thistle
#

It's pretty much just print(arg) unless it's somehow overcomplicated?

dire obsidian
#

to import an object from a external file should i use classes?

slender thistle
#

Hmm

hasty mulch
#

Just import works for me

slender thistle
#

How's the object stored?

hasty mulch
#

Unless you have an error @dire obsidian

dire obsidian
#

you use tkinter?

slender thistle
#

Oh that thing, no

hasty mulch
#

@dire obsidian Do you have any errors?

dire obsidian
#

let me execute it

hasty mulch
#

Kk, let us know

sudden geyser
#
  1. Listen to the voiceStateUpdate event: https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-voiceStateUpdate
  2. See the .channelID and .id (.id I think is for the member ID).
  3. Check the .connection or .sessionID property (I don't know which one determines if the member is in the voice channel, but experiment).

If .channelID is equal to the channel ID and .id is the member you want to kick (use .member.id if .id doesn't actually point to the member; it should), call the .kick() method.

slender thistle
#

I mean, importing should work just fine. 🤔
Then again, it's 0642 and I haven't slept.

hasty mulch
#

I’ll handle, I think I know what his issue is

forest drift
#

Thanks

hasty mulch
#

@dire obsidian Anything?

dire obsidian
#

hold a sec

#

my pc is slow

hasty mulch
#

Ok

#

Tag me when you execute it

dire obsidian
#

@hasty mulch well i have this

hasty mulch
#

And?

dire obsidian
hasty mulch
#

Ok, any errors?

dire obsidian
#

yes

hasty mulch
#

Move the two variables over and try it

#

Best I can give you based on what I know

dire obsidian
#

like import main?

hasty mulch
#

Try it and see

dire obsidian
#

i try it

#

now see

#

anyways

#

thanks for the help

#

i need to go, take care

drifting wedge
#

I want to turn my bot on, help plez? I want to make mee6

gentle thicket
#

explain more?

#

maybe give some example code

#

@drifting wedge sry for ping just want ur attention

drifting wedge
#

Like just turn on my bot for me please

#

It’s tag is mee5#1842

gentle thicket
#

what api are you using?

sudden geyser
#

0exe are you joking or no

drifting wedge
#

No, I want to turn on my bot

#

Someone please do it for me

gentle thicket
#

we cant

drifting wedge
#

I’m joking by the way, I’m not THAT retarded lol sorry 😔

sudden geyser
#

@dire obsidian your most recent error likely means you tried importing one module, then inside that module you try importing that other module, leading to a circular (also known as recursive) import.

The reason for your last error was because label was not defined. I assume you're referring to the Label class from the tkinter module, but there needs to be some form of instance of it in order to use it. To my knowledge, the command keyword is called when the user clicks on the button.

I assume you want to pass some kind of argument to your click function. If you really wanted to pass an argument, one option would be to use a lambda so you call it with an argument. But label can't just come from nowhere.

slender thistle
#

Small sneak peek at the new update regarding dblpy

        webh = dbl.WebhookManager(bot=self.bot, port=port)
        webh.dbl_webhook("/dbl", "dbl_pass")
        webh.dsl_webhook("/dsl", "dsl_pass")
        await webh.run()
hasty mulch
#

It’s tag is mee5#1842
@drifting wedge Are you joking about this as well?

lusty furnace
hasty mulch
#

@lusty furnace Yep

wind sigil
#

Anyone s there ??

lusty furnace
#

@hasty mulch can u make a giveaway command or ticket command bc im having trouble finding out how to do that altho i do know lots abt discord.py

hasty mulch
#

I can’t really

#

Cause I haven’t done it myself

lusty furnace
#

oof

#

i rly just know more abt python in general but making a bot using the language basically opens up so much more problems and discovery

#

its almost like a whole new language within a language

hasty mulch
#

Better to ask there @lusty furnace

earnest phoenix
#

It does not run

blazing portal
#

sendMessage is not a thing#

earnest phoenix
#

where is

blazing portal
#

it's just send

earnest phoenix
#

can you write it to me command?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

blazing portal
#

message.channel.send(...);

earnest phoenix
#

so?

blazing portal
#

message instead of mesasge, but yes

earnest phoenix
#

that is, if I put it to run it will run normally?

blazing portal
#

tryitandsee

blissful coral
#

Try it

earnest phoenix
#

Ty

sonic lodge
#

sendMessage is a v11 thing

blissful coral
#

Which v11 will be unsupported soon

#

Well your on v12 so that doesn’t really matter

opal plank
#

im fairly certain v11 has been deprecated for 2 months now

sudden geyser
#

Probably for longer.

#

v11 goes extinct in 6 days though.

#

It'll be fun to watch.

blissful coral
#

Can’t wait 😬

#

Be ready to be in support channels telling people to put cache

sudden geyser
#

Sees length and starts sweating

blissful coral
#

Same

faint prism
#

Might as well get that link pinned

spare fern
#

helo

faint prism
#

Just ask

spare fern
#

thanks

#

so i have this say command

#

where my bot repeats what u say

#

but i wanna know how to diable mass mentions

faint prism
#

Like what for example

spare fern
#

like @everyone

#

or @here

faint prism
#

You can check if the content contains those mentions

#

And if it does, either redact them or don't reply

spare fern
#

oh wdym by that

#

like i have no idea what code i supposed to do

faint prism
#

And now that you know how to detect specific mentions, it's just simple if else logic

spare fern
#

Thanks

sonic lodge
#

is it possible for discord.js's collector classes to cause memory leaks if you don't remove the listeners after they end?

fluid basin
#

It'll be fun to watch.
maintaining own updated fork be like

karmic compass
#

can you edit certain parts of a pull request in github so you only allow certain thingsd through

#

asking in advance

earnest phoenix
#

hi

#

why is my bot not in the server yet why is it not publish on the website

#

it’s been like five whole months

grizzled isle
#

Firstly, wrong channel
Secondly, its gotta get approved.

earnest phoenix
#

maybe longer

#

i’m about ready to click the leave button because I’m about done

#

go right ahead lose a member

grizzled isle
#

tbh they got about 100K members

#

but again, wrong chat

earnest phoenix
#

do you did you read this side message or are you blind

grizzled isle
#

yea, bot development, your question fits better in #support
is your lack of understanding strong or weak?

sonic lodge
#

it's been 1 month

#

you're just barely hitting the how-long-it-should-take-according-to-the-faq-and-everyone-else limit

earnest phoenix
#

Does anyone know of a bot that shows news stories?

#

@here

restive furnace
#

lol

fluid basin
#

bruh not here plz, and the minimum wait time is 6 weeks, its barely been 4 and you're complaining

terse lynx
#

how to make bot avatar move on top.gg site

fluid basin
#

css animations

terse lynx
#

any code available?

cinder patio
#

google

#

"moving image css"

#

"levitating image css"

wet forge
#

is it just simple hovering-like animation

delicate shore
#

Can anyone explain what just happened

cinder patio
#

Looks like message replies will be an official thing now, not just a > and a ping

terse lynx
#

can you give ur code?

cinder patio
#

no

terse lynx
#

just for refrence

wet forge
#

Isn't it just setting up two keyframes, and slowly moving between them to give it that levitating effect

terse lynx
#

i don't know how to insert code in Description box

slender thistle
#

style tag

earnest phoenix
#

n:help

rustic nova
short siren
#

@terse lynx use transform and transition

#

If you want to move it up then it's translate if u want to increase size then it's scale

lean sorrel
#

how to make a bot?

rustic nova
#

Through code @lean sorrel

fickle sapphire
#

..

opal plank
#

^^^^

#

@lean sorrel

earnest phoenix
#

Looks like message replies will be an official thing now, not just a > and a ping
@cinder patio i forget to remove the ping 100% of the time i hope replies won't have the ping automatically there

abstract coyote
#

go right ahead lose a member
@earnest phoenix °looks at member count°

#

oh i did that wrong :(

#

BRUH LOL

topaz sleet
#

How to fix

#

When i tag my bot

opal plank
#

how to fix what?

#

explain better please

topaz sleet
#

It has 2 lines of text

#

My bot supports English and Vietnamese

opal plank
#

show pls

topaz sleet
opal plank
#

@topaz sleet you want customized prefixes?

#

like @ bot AND a default prefix?

topaz sleet
#

I dont know

#

It has 2 lines of text

#

I wanna fix it

opal plank
#

you have 2 bots running on the same token?

earnest phoenix
topaz sleet
#

uhmm no

earnest phoenix
#

damn

topaz sleet
#

Fixed, thank @opal plank

opal plank
ionic shard
#

using node-fetch on reddit
sometimes return urls which are not pure Image/Gif urls
can i specify to only get .gif .png etc?

opal plank
#

which lang @ionic shard ?

ionic shard
#

js

opal plank
#

try checking with endsWith()

#

if(endsWith('.png') || endsWith('gif')...) // continue code

#

that should help a bit

ionic shard
#

thanks

opal plank
earnest phoenix
#

In Goggle Analytics how do you check the average duration for which users stay

earnest phoenix
#

if(endsWith('.png') || endsWith('gif')...) // continue code
@opal plank this is just actually surface checking, you need to check the file header if you want to know the actual file type

opal plank
#

that'd be best, yeah

earnest phoenix
#

an .exe can be renamed to a .gid

opal plank
#

but if they only have URL available

#

aka they using a lib

earnest phoenix
#

gif*

opal plank
#

they best bet is liekly checking for extension with that string search

#

some libs just give you the object with simplified and parsed results

#

which i assume is that case with the lib they are using for reddit

earnest phoenix
#

none of the libs give you the actual file data lol?

opal plank
#

i know quite a few that dont

#

nor do i know which endpoints they are touching and what it returns

#

but yes, checking headers would be preferrable

earnest phoenix
#

the url is enough, make a GET request and read the first few bytes of the data you receive just to check for the file header

opal plank
#

otherwise, use string search

earnest phoenix
#

i think you might have a misconception

#

the file header is in the actual file

#

in binary

opal plank
#

thats what i mean with string search

#

first, it may have queries in it

#

so it might not even work with endsWith() as i suggested

#

its more of a patch rather than a permanent fix

limpid geode
#

Is anyone else having problems with getting users by ID in Discord.py 1.5?

slender thistle
#

You sure your cache isn't dead?

limpid geode
#

Hmm might be.

#

Looks like it might require the member intent.

#

Hmm no change. I assume there's a way to reinitialize the bot cache

#

I got it, there's a new guild_ready timeout that defaults to two seconds.

#

Hmmm didn't like that either....must be some new Discord API thing.

forest drift
#
let attachment = new Discord.Attachment(image.toBuffer(), "goodbye-image.png");

how would i change that to work with v12?

limpid geode
#

No, it's definitely intents.

surreal cradle
#

hey, i want to download gta 5

#

can anyone guide me?

compact oriole
#

wrong server

cobalt spruce
#

@surreal cradle rong server

#

lol

#

@compact oriole u work for trivia

#

sorry for ping

compact oriole
surreal cradle
#

its ok. im new on discord

cobalt spruce
#

huh

surreal cradle
#

i don't know much about it.

compact oriole
#

yea I make my own bot?

cobalt spruce
#

EPIC

#

i mean

#

wat

green kestrel
#

so... i got my token auto reset last night 😦

cobalt spruce
#

BRAIN ALERT

green kestrel
#

that'll teach me to go to sleep.

compact oriole
#

oh shit Brain is here sweat

cobalt spruce
#

U STOLE NAME

#

sad

surreal cradle
#

what time is it there?

compact oriole
#

also why did it get reset?

green kestrel
#

bot got caught into a reboot loop

compact oriole
#

ohhh rip

green kestrel
#

restarted 150 times in 2 hours

compact oriole
#

damm

green kestrel
#

it was due to a dependent library being stricter than it used to be

cobalt spruce
#

sad

compact oriole
#

oh so it got changed

green kestrel
#

updated, seemed fine, went to bed.... rip

rustic nova
#

Then gets quarantined by Discord because it's getting ratelimited

green kestrel
#

it also worked fine for hours before that in dev/test

compact oriole
#

🤔

cobalt spruce
green kestrel
#

goes to show you can never trust your dev env

compact oriole
#

yea

green kestrel
#

hahaha

#

imagine antivirus.

compact oriole
#

you basically can never test everything

#

LMAO antivirus

alpine coyote
compact oriole
#

...

green kestrel
#

for all you people with antivirus, i have some other homeopathic cures for y'all

compact oriole
#

best cure for virus is brain

#

brain not Brain

green kestrel
#

(what im saying is: windows defender is fine. you dont need to be suckered into a subscription for something else)

cobalt spruce
#

@green kestrel antivirusis gud

compact oriole
#

(what im saying is: windows defender is fine. you dont need to be suckered into a subscription for something else)
exactly

forest drift
#

if im using member.displayName, what would i use the display the discriminator?

compact oriole
#

@alpine coyote don't advertise ffs

rustic nova
compact oriole
#

I don't care about your bot/server LUL

alpine coyote
rustic nova
#

What is your goal LinusWeird

compact oriole
#

also this is not the place to do it

green kestrel
#

@alpine coyote please do not advertise here

alpine coyote
#

مبرمج

#

اك

cobalt spruce
#

@alpine coyote dont spam

alpine coyote
#

Ok

#

Sorry

rustic nova
#

Starts speaking Enchanting

cobalt spruce
#

i cant translate

#

i can translate

#

@rustic nova he said
programer
and then
ok

alpine coyote
#

glitch and reple and dbd

rustic nova
#

Dbd

limpid geode
#

Yeah, it was intents. Enabled the member intent and added a couple lines of code and it's working.

alpine coyote
slender thistle
#

Hey Midnight

slender thistle
#

There some sort of a list of intents anywhere?

cobalt spruce
#

lol

#

Dead by Daylight

rustic nova
#

No

limpid geode
#

Just member and event

cobalt spruce
#

;-;

slender thistle
rustic nova
#

Discord bot designer is what they're referring to Ayayaweird2

cobalt spruce
#

@slender thistle ur not mod at the moment