#development

1 messages Β· Page 590 of 1

heavy agate
#

its both

wooden prawn
#

I'm too good for python, I use the vastly superior php /s

heavy agate
#

oh no^^

scarlet bane
#

no it is not

heavy agate
#

Sorry guys

wooden prawn
#

Interesting, a bot that runs code?

scarlet bane
#

indeed

heavy agate
#

i thought of php ^^

scarlet bane
#

you can do and in php?

wooden prawn
#

&& and ||

#

not as far as I know

#

if you can you've just taught me something new

scarlet bane
#

TIL

wooden prawn
#

Huh.. TIL

marble needle
#

lol imagine a programming language that doesn't support barebones logical operations

scarlet bane
#

don't bash other languages in here

#

its kinda rood

marble needle
#

how's that a bash if it exists in php (and any other language) thinkfused

scarlet bane
#

i'm not going to bother explaining

#

you know you meant it rudely

wooden prawn
#

I imagine if that were to be true, PHP would be a language that didnt πŸ˜‚

#

I've been a PHP dev for 3 years and you just taught me something new, also it was kinda an obvious statement, all languages should (and probs do) implement it

scarlet bane
#

look in #commands if you really want a reason to dislike php ShibeKek

unreal rampart
#

Anyone know why my bot works perfectly on one server, but on another a cog fails loading

mossy vine
#

discord is going fucky-wucky rn

unreal rampart
#

so i should just wait

unreal rampart
#

"Im the smartest programmer that's ever lived i was chosen by god to make his temple, and i was given divine intellect"

scarlet bane
#

wrong channel but sick dude

grizzled spruce
#

Anyone know a good tutorial or guide for making a bot respond to commands when you send them to it in DMs?

earnest phoenix
#

if (msg.channel.type == "dm"){}

#

i want to make a prefix like word command args instead of !command args

unreal rampart
#

prefix = "nice"
bot = commands.Bot(command_prefix=prefix)

#

atleast for py

#

ot just bot = commands.Bot(command_prefix="jan")

earnest phoenix
#

like i've tried doing certain things to make it work ie: adding a space before the prefix in json and adding a space towards the msg.content check in the index but it doesn't seem to be working

unreal rampart
#

how do you set a prefix in json

earnest phoenix
#

i might just try rewriting in in discordia or discord.net because javascript is my worst nightmare

unreal rampart
#

lmao

earnest phoenix
unreal rampart
#

good luck!

earnest phoenix
#

so having issues with dashboard | im trying only to make a user to send a bot and bot only . and if they try a user ID it returns error

#

so far i have this

#

if (client.fetchUser(req.body.botsID))

#

req.body.botsID = ID input , any help will be greatly appreciated .

amber fractal
#

what's the error?

earnest phoenix
#

no errors

amber fractal
earnest phoenix
#

so user.id just returns a success message

#

oh

#

dont mind that part

#

just trying to make

#

error message

#

if they enter user ID

amber fractal
#

check if the fetched user is a bot

earnest phoenix
#

if (client.fetchUser(req.body.botsID).bot) return;

#

right

amber fractal
#

if you want it to return if it's a bot yes

#

I think fetchUser has that anyways

#

lemme check

earnest phoenix
#

if its a bot return success

#

if not bot return error

#

i tried lots of ways

#

but none seem to work.

amber fractal
#

if req.body.botsID is actually a bot id, that will return

#

you'll also need to await it as it's a promise

earnest phoenix
#

hm

#

what you mean

amber fractal
earnest phoenix
#

ill remove

amber fractal
#

or did you mean the promise part

earnest phoenix
#

return.

#

promise

amber fractal
ruby zephyr
#

How do I make it so my bot shows how many servers its in on the website?

grim aspen
#

webhook i think

frank dust
#

send a post request to the api with the server count

ruby zephyr
#

Idk how to do that

#

:/

frank dust
#

what lang?

ruby zephyr
#

discord.js

frank dust
ruby zephyr
#

What menu do I go to

frank dust
#

it should be on the left

ruby zephyr
#

like this?

#
const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your discordbots.org token', client);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
earnest phoenix
#

@amber fractal u got example

#

xd

frank dust
#

sure

amber fractal
#
  setTimeout(function() {
    resolve('foo');
  }, 300);
});

promise1.then(function(value) {
  console.log(value);
  // expected output: "foo"
});

console.log(promise1);
// expected output: [object Promise]

frank dust
#

try it

ruby zephyr
#

ok

#

It didnt work

frank dust
#

did you install dblapi.js through npm?

ruby zephyr
#

Yes

#

I did

#

"dblapi.js": "^2.3.0"

frank dust
#

I don't use js so

#

Β―_(ツ)_/Β―

ruby zephyr
#

Oh ok

frank dust
#

you could just do a simple POST request to the api if you don't want to use the wrapper

earnest phoenix
#

somebody is having issues trying fetch any discord invite link?

ruby zephyr
#

@frank dust How do I initiate the command

#

OR does it just happen on start up

frank dust
#

idk

#

you could use that instead of the wrapper

high lava
#

I currently have this to check a if a parameter was added to a command ```js
if (args[0] === '-l' || args[0] === 'list') {
withList(m, args[1], client, ops);
}

I want to be able to specify the rest of the array of arguments instead of just the second object somewhat like this ```js
withList(m, args['1 and up'], client, ops);
inner jewel
#

array.slice(1, array.length)

#

iirc

high lava
#

That worked. Thanks

rocky mesa
#

what's the 12.0.0-dev version of mutedRole = message.guild.createRole({ name: "Muted", color: "#000000", permissions:[] });
?

#

Can't seem to find it in docs on mobile

high lava
#

This is discord.js right?

rocky mesa
#

yep

high lava
#

Because I don't even see 12.0.0-dev as an option on there

rocky mesa
#

masters

#

🚢

high lava
#

oof. Of course

#

Ok one sec

#

Uh yeah, it's not there. Weird

rocky mesa
#

well I know it's message.guild.roles.create

#

but I can't figure out how to make it work from there

high lava
#

message.guild.roles.create({

#

wait

#

oof

#
message.guild.roles.create({
    data: {
        name:
        color:
    }
    reason:    
});
rocky mesa
#

I'll try that

#

tyty

earnest phoenix
#

how can i create embed pages in java script :/

rocky mesa
#

??

#

can you not mention AND DM me randomly

west spoke
#

xd

empty owl
#

Is there a way to fetch a message by id and delete it?

ruby dust
#

that's actually exactly how you do it

empty owl
#

what

#

ok

west spoke
#

Mmh

#

I don't know exactly, but I'll find it and dm it to you @empty owl if you still need it

empty owl
#

thanks and yes

amber fractal
#

it's fetch then delete

#

what you said

empty owl
#

like how to fetch

#

just id.delete?

west spoke
#

Wait

empty owl
#

idk

west spoke
#

What language

empty owl
#

discord.js

west spoke
#

Mmh bai sorrwe

#

I always assume that peoples use python ree

empty owl
#

ok

#

lol

#

so like

ruby dust
#

either way, there must be something in the discord.js docs, look somewhere under text channels I assume

empty owl
#

channel.fetchMessage(id).then(msg => msg.delete)

#

is it like that

ruby dust
#

I'm python

empty owl
#

ok

#

@amber fractal can u help me>?\

#

TypeError: channel.fetchMessage is not a function

amber fractal
#

channel needs to be a TextChannel

earnest phoenix
#
@bot.command()
async def divide(ctx, num:int,*, num2:int):
        embed = discord.Embed(title = f'''{num} / {num2}=''', colour=discord.Colour.gold(), description = num / num2)
        await ctx.send(embed=embed)
#

anyone know why this wont work

#

i can't seem to find it

#
In embed.description: Could not interpret "1.5" as string.```
#

do i need to format it or something?

#

yep

#

thanks!

pallid zinc
#

I don't now why my script is very slow

west skiff
#

what do you mean slow? like it doesn't react to messages very fast?

jagged birch
#

You ask for help a lot god we can’t solve everything for you

#

Domains are much easier to type in and look way better

#

But both work

pallid zinc
#

Ya

#

It react after 6-7 sec

west skiff
#

Well that could be your own network being slow or something just a lot happening before it sends the response message

pallid zinc
#

I had hosted it on a vps

#

And only delete command before it

minor kelp
#

How to make my bot send messages saying what servers it has joined/left.
and how many servers it is in?

late hill
#

Listen for guildCreate / guildDelete events

#

Amount is something like client.guilds.size

#

Depends on your library

bright spear
#

@minor kelp always say the lib and version when asking a coding question

minor kelp
#

v1.0.0a

#

@bright spear

#

There

west skiff
#

rtfm

minor kelp
#

How to make my bot send messages saying what servers it has joined/left.
and how many servers it is in?
D.py
Rewrite:v1.0.0a

minor kelp
#

u wot m8

west skiff
#

read the fucking manual

minor kelp
#

shut the fuck up

bright spear
#

What

#

That's an actual phrase...

minor kelp
#

@west skiff

return await ctx.send("STFU... ||https://www.youtube.com/watch?v=OLpeX4RRo28||")

Is what i used

west skiff
#

oh I was thinking it was a manual embed for some reason

minor kelp
#

lol no

mossy vine
#

So
Lets say i have a value in a js file, that i require in file2
If i edit the value of the variable in file1, will file2 automatically use the new value?

languid dragon
#

stop asking to be spoon fed

#

google it

#

then learn how to code and debug your code

#

if you are genuinely confused and you absolutely can't find anything on google whatsoever then try asking better questions than "Help plz" with a terrible screenshot that does not explain your issue whatsoever

#

if we could find the issue with just that image, then surely you could figure it out with whatever braincells you do have

#

if you're just writing "help plz" in google, obviously you're not going to find any results

EDIT: The messages above were for @pallid zinc, seems like he didn't like being told to stop so he deleted his messages.

west spoke
#

xd

silent cloud
#

hey guys somebody can help me

#

its a stupid ask but

#

how to make a bot to update some part of the code for example every 5 minutes

#

in js

earnest phoenix
#

Where do you host The bot? @silent cloud

spare glen
#

how do i remove an application from a team in discord developer portal @modern sable

grim aspen
#

answer coming right up

spare glen
#

wdym

modern sable
grim aspen
#

wait shit i read that wrong

spare glen
#

smh

#

that is to delete an app

#

not remove it from a team

modern sable
#

yeah you cant do that currently

spare glen
#

wtf

#

why

#

how tf

#

thats not good

loud salmon
#

because thats what they said when they added the feature

spare glen
#

smh, why would they add that and not add a remove from team button

silent cloud
#

i host in a heruko

#

@earnest phoenix

unique nimbus
#

heruko bad

formal agate
#

yes

#

tho shuts off after like 5 min

west spoke
#

xd

#

Andthatswhyijusthostitonmycomputer

formal agate
#

^

gleaming glen
#

Can sound like a dumb question but why can I not send an embed using a webhook? How does it work?

formal agate
#

i need a vps soon tho

#

🀦

west spoke
#

i havent experimented with webhooks

#

but

west spoke
#
embed=Discord.Embed(title='', description='', color=0x(colorvalue))
await client.send_message(webhook.channel, embed=embed)
#

?

#

ive never tried webhooks

earnest phoenix
#

@silent cloud so use an database

#

Or fs

#

But idk if fs work on heroku

#

I use vpn and glitch

#

@west spoke what you need?

gleaming glen
#

It does not work like client.send.message @west spoke

west spoke
#

no

#

i dont need anything

#

i just tried to help

earnest phoenix
#

So lol?

west spoke
#

it depends on if you use rewrite or not

gleaming glen
#

@formal agate that it just how to create one

formal agate
#

look at part 2 then

west spoke
#

i dont need any help

earnest phoenix
#

@gleaming glen good one

gleaming glen
#

None of them have that

gleaming glen
#

I already have a webhook created @earnest phoenix, I just need to send an embed with it. This one is not for that i suppose

#

already checked that

earnest phoenix
#

Hmmm

#

So you have an webhook

#

You wanna send an embed

#

Edit The body

gleaming glen
#

Token and the id is set up and sending a normal message works

formal agate
#

Ok im gonna ask a really dumb question here but im trying to figure out if there is an other item in the map but i cannot get it to work no matter what I do. Here's the code in context now so hopefully you can tell me because idk what I'm doing wrong.

    items.shift;

    if (items.length > 0) {
    //random code here
    }```
west spoke
#

thought so

earnest phoenix
#

When you have body on webhook

west spoke
#

xd

gleaming glen
#
var status = new Discord.WebhookClient(ayarlar.statusHookid, ayarlar.statusHooktoken)

status.send("something here")
``` this works.
earnest phoenix
#

Paste:
{
"embeds": [

formal agate
#

ooof

gleaming glen
#

I do not have a body

earnest phoenix
#

There you paste it

gleaming glen
#

Where Thonk

earnest phoenix
#

status.send(embed: yourEmbed)

#

It wont work?

gleaming glen
#

not works either

earnest phoenix
#

Hnmm

#

So

#

Idk webhooks using code

#

But you need json

#

So when you send an message you need json too? @gleaming glen

gleaming glen
#

No I don't, the one that I posted above works

earnest phoenix
#
webhook.send('This is an embed', { embeds: [{ thumbnail: { url: 'attachment://file.jpg' } }], files: [{ attachment: 'entire/path/to/file.jpg', name: 'file.jpg' }] }) .then(console.log) .catch(console.error);
#

@gleaming glen

gleaming glen
#

Thank you loveya

umbral tusk
#

anyone here can teach me how to run my bot 24/7?

earnest phoenix
#

buy a vps

umbral tusk
#

if not here where do i ask

modern sable
#

this channel has a few paid hosters in the pinned messages

umbral tusk
#

any free way

#

?

earnest phoenix
#

no

#

there is free hosting but it's quite shit and not made for discord bots

#

primarily for websites

umbral tusk
#

ok then how could i aply my bot if im away mainly and its offline when it gets checked

grim aspen
#

why don't you run it on your computer with a raspberry pi

silent cloud
grim aspen
#

ew no

#

i don't use glitch

#

i use a vps

earnest phoenix
#

@silent cloud databasr

silent cloud
#

hey

earnest phoenix
#

do not use a free hosting

silent cloud
#

i need make hello-sqlite?

#

cry i know but, i dont have now money

earnest phoenix
#

okay, a vps is 2 euros a month, just don't go to starbucks for a day

silent cloud
#

πŸ˜‚

earnest phoenix
#

an alternative is to get a part time job

silent cloud
#

@earnest phoenix

#

i need make hello-sqlite?

umbral tusk
#

i give up on trying these stuff

empty owl
#

@silent cloud i need to make a hello-vps-pls-get

#

and ^ no

#

the best way is to use like mongo db

#

how do u delete a message by id

rugged linden
#

Use uptimerobot to ping the bot every 5 minutes

#

Far as I know The Kepler Bot stays online because of that

mossy vine
#

or an ever better solution: buy an actual vps. theyre cheap and definitely worth it

rugged linden
#

^

#

I spent it all on a new pc

mossy vine
#

my only excuse for using glitch was not having a reason to buy a vps, as it probably isnt worth it if its just a small private bot. but now that i have actual projects to host, i bought a vps

rugged linden
#

huh

#

Well if my bot grows a little too big I'll switch to something else

#

And I've already conqured 20KB with my data from users.

mossy vine
#

i only hosted private bots on it, so i didnt care much

umbral tusk
#

@rugged linden hey i watched one of your vids.your a cool youtuber

rugged linden
#

uh thanks

silent cloud
#

hey guys

#

what i need to do if i have this in logs

#

(node:3958) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit

rugged linden
#

hmm

mossy vine
#

OH GOD

rugged linden
#

I've never seen that before

mossy vine
#

pure horror right here

#

so lets get this straight

#

this is what you are doing for commands

client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
#

which is bad practice

#

dont do that

#

instead, this is what you should be doing

silent cloud
#

ohhh

mossy vine
#
client.on('message', message => {
    //some code
    //some more code
    //even more code
})```
silent cloud
#

hmm

#

ty

mossy vine
#

you dont need a different event listener for every command

silent cloud
#

i think i do this tommorow im tired now

#

ty rly

mossy vine
#

yw

silent cloud
#

hm

#

i don't understand

#

if my bot dont do anything 12 hours he go offline?

#

or what?

gritty bolt
#

My bot is flickering on and off and I cant find out why

#

Is AWS having issues right now or is it something else?

fiery stream
#

Yo

#

Can anyone design me nav bar

#

Stylesheet

silent cloud
#

@gritty bolt

#

can send code?

#

maybe can help?

#

if it js

#

else sry

gritty bolt
#

its discord.js

silent cloud
#

can send error

fiery stream
#

Under

silent cloud
#

?

fiery stream
#

Can u design me nav bar pls

mossy vine
#

Do it yourself

#

Noones gonna make a navbar for you

fiery stream
#

Thats the problem

silent cloud
marble needle
#

tons of templates, search one you like and copy it if you can't be arsed to do it yourself, as simple as that

fiery stream
#

#socialexperiment

gritty bolt
#

SyntaxError: Unexpected token < in JSON at position 0

#

All im getting

fiery stream
#

My proj

mossy vine
#

You cant just fucking ask for someone to do free work for you then if shit doesnt go your way say "social experiment" bro thats not how it works

#

@gritty bolt send your json file

fiery stream
#

Chill

gritty bolt
#

I dont have a file for it

#

I'm receiving it

#

From a web server

#

I can get the response it sends

mossy vine
#

Well its obviously not json

#

If it begins with <

gritty bolt
#

I know

#

Its coming from a file that doesnt even exist

#

I get like three throw errors and then that

marble needle
#

would you mind pasting the entire error log into a pastebin or something

#

would probably be more helpful than small portions of it

empty owl
#

discord.js is broken

#

TypeError: user.addRole is not a function

silent cloud
#

you need use msg.user.addRole

empty owl
#

this is user

#

let user = message.mentions.users.first()

silent cloud
#

hm

#

i think he can do this too

#

i need to try itspoonfeed

marble needle
#

@gritty bolt 1.) you're missing an event listener for "error"
2.) you're getting an api error for missing permission -> you're trying to access discord data/make requests you have no access to
3.)the data you're trying to parse is either not even json or invalid (json objects don't start with <)

gritty bolt
#

Ok

#

Fixed the JSON data

west spoke
#

ok question

#

i keep getting this error in my console

#

Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x058AEB70>

gritty bolt
#

thanks

west spoke
#

:I

#

o k

marble needle
#

i mean, i've never used aiohttp but if it says unclosed session you might wanna close it at some point

umbral tusk
#

whoever said about glitch.com i wish him best of best

fiery stream
#

@umbral tusk what

umbral tusk
#

i made my bot automated so itll never shut down,someone mentioned the site glitch.com and i tried and success

fiery stream
#

Nice

silent cloud
#

can help me

umbral tusk
#

i can

silent cloud
#

oh star

#

how to do automated bot

fiery stream
#

I have too

umbral tusk
#

its disgusting but it works

silent cloud
#

i need to him never down

umbral tusk
#

uhm can i post a link here by chance?

silent cloud
#

i think yes

umbral tusk
#

actually ill dm you

silent cloud
#

k

#

:D

fiery stream
#

LOL ez

umbral tusk
#

its not as hard as i thought at first

silent cloud
#

delete link bro

#

u can got ban

fiery stream
#

Why??

quartz kindle
earnest phoenix
#

do not use free hosting for the hundreth time

quartz kindle
#

for the 500th time, google and amazon exists

burnt canyon
#

Can anyone make me a discord bot for free?

unique nimbus
#

No

marble needle
#

that's not how this works

earnest phoenix
#

@burnt canyon why you need it?

burnt canyon
#

I need it because I want a bot that is unique to my server. There’s also different commands I would like on it including a command where it sends a message to a specific channel

#

I could go more in depth if you want to move to dms

unique nimbus
#

Learn to code

#

It is not that hard

marble needle
#

there's a magical platform called github where developers host their code if they feel like being generous

#

search something that fits your needs

#

if it doesn't exist create it yourself

burnt canyon
#

How

unique nimbus
#

Learn to code and make bot

#

YouTube is good

burnt canyon
#

Yea but hard to understand

unique nimbus
#

Practice makes perfect

burnt canyon
#

What’s to pratice if I’m clueless

unique nimbus
#

Well you are clueless because you haven't tried

burnt canyon
#

Oh I’ve tried

#

Couldn’t even get past 5 lines of code

unique nimbus
#

what language

burnt canyon
#

Java

unique nimbus
#

Gard we can't baby feed you

#

you need to learn

#

m8

#

I tried for 1 day java

grim aspen
#

please look up learning to code

earnest phoenix
#

Js

unique nimbus
#

made a shit input command

marble needle
#

if you give up after five lines i wouldn't really call it trying tbqh

grim aspen
#

agreed

earnest phoenix
#

Anidiotsguide is helpful

unique nimbus
#

system.println("gay")

earnest phoenix
#

I think

unique nimbus
#

isnt that java

earnest phoenix
#

No u

#

you know what they say

unique nimbus
#

Gard there are thousands of bots for you to choose

#

here

burnt canyon
#

I followed a guide and I did everything it said and it didn’t work everything was incorrect

unique nimbus
#

then you did something wrong

earnest phoenix
#

following a bot making guide isn't learning the language

unique nimbus
#

no

marble needle
#

not if the guide was trash/outdated

unique nimbus
#

yesd

burnt canyon
#

There isn’t bots with customization with logos and stuff

#

I would want a custom logo

unique nimbus
#

learn to code

earnest phoenix
#

making a bot is merely a normal project, it's expected of you to know the language you're working with

unique nimbus
#

make your own bot

#

yes

burnt canyon
#

Well I don’t know shit

earnest phoenix
#

too bad

cold harness
#

^

grim aspen
#

anidiotsguide is not really helpful to getting started with coding

#

that's to get started making a bot

earnest phoenix
#

if you don't want to spend time learning, pay someone to do it for you

cold harness
unique nimbus
#

Gard for the love of god learn to code properly

grim aspen
#

he's using js @cold harness

burnt canyon
#

How much would I have to give for any of you make me a bot for me

marble needle
#

he isn't using anything he asked for a free bot

cold harness
#

oh well same thing but read the entire discord.js docs

unique nimbus
#

well it is normally per hour

#

also no

#

plz learn yourself

marble needle
#

this discord is not a freelance recruitment heaven

grim aspen
#

just please go look up how to code

burnt canyon
#

You guys are experienced

earnest phoenix
#

that and stop forcing the guy to learn if he doesn't want to

unique nimbus
#

BECAUSE WE PRACTISED

earnest phoenix
#

it's like forcing a baker to be a mechanic

grim aspen
#

we can't spoonfeed

unique nimbus
#

NOBODY CAN DO SHIT WELL WITHOUT PRACTISE

earnest phoenix
#

stop being annoying

cold harness
#

haha ^

earnest phoenix
#

stop splitting your messages into ten thousand parts and keep your cool

marble needle
#

remember kids, caps on the internet is cool and brings your point across

grim aspen
#

listen

#

we can't give you the code in this channel

#

that doesn't help with learning

marble needle
#

tl;dr if you don't wanna learn pay up (but not here), you don't get things thrown at you for free

grim aspen
#

if we did you wouldn't learn anything out of it

earnest phoenix
#

if the guy doesn't want to learn, he doesn't want to, he can pay someone to do it for him however this is not the place for to find a freelancer, instead of shouting and forcing someone to do something they don't want to do, redirect them or leave the chat

unique nimbus
#

yeet

fiery stream
#

Lol

#

U can always use someone bot

unique nimbus
#

yes he wants his own

#

yes

burnt canyon
#

I want a customized one

fiery stream
#

Lol

burnt canyon
#

Don’t say make one

unique nimbus
#

Gard you need to learn how to code please

fiery stream
#

Use xon

#

Its my old bot

unique nimbus
#

@fiery stream Don't advertise

fiery stream
#

Its in github

#

I am giving him code

#

Its not adv

hybrid pecan
#

aren't there bots you can download and like self host?

burnt canyon
#

@unique nimbus stfu

earnest phoenix
#

you don't even know what features he wants

unique nimbus
#

no

grim aspen
#

jazz

unique nimbus
#

Gard please don't swear, getting yeeted with code won't teach you anything

fiery stream
#

Sup

grim aspen
#

you said you were giving him the code right?

burnt canyon
#

What if I don’t want to learn

fiery stream
#

Yea

unique nimbus
#

then download a bot from the website

fiery stream
#

Why did they nick me

unique nimbus
#

i mean make a bot join

fiery stream
#

Thats not how my name is supposed to he

earnest phoenix
#

because your username is cancer

marble needle
#

^

fiery stream
#

Shut up stop being toxic

earnest phoenix
#

what lol

marble needle
#

that's literally the reason though

burnt canyon
#

Jazz dms

unique nimbus
#

Its because it goes to the top of the screen

fiery stream
#

What ever

earnest phoenix
#

your username is annoying and can't be mentioned easily so the mods nicked you

unique nimbus
#

yes

fiery stream
#

What ever

#

Idc

#

That much

unique nimbus
#

yeet

marble needle
#

how hard can it be to not throw a contextless "yeet" into a channel every two minutes

unique nimbus
#

50/50

burnt canyon
#

Someone give code

earnest phoenix
grim aspen
#

lmao

earnest phoenix
#

yw that'll be 30 usd

grim aspen
#

if i were to code a bot for you, i would need $20

#

but no i don't code bots for others

quartz kindle
#

$20/hour

#

The average JavaScript developer hourly rate (worldwide) is $61-80/hr

grim aspen
#

oh hell yeah

#

worth more than cybersecurity

west skiff
#

what? that doesn't sound right that is so much

robust breach
#

^

quartz kindle
#

The median annual salary of JavaScript developers in the U.S. is $98,000.

#

idk how accurate it is, but its an article from 2019

#

js is in very high demand recently because of its flexibility and portability, thanks to node.js

robust breach
#

I don’t doubt it being that high in the US

#

but does it say that hourly pay is that high worldwide?

#

can’t check link atm

quartz kindle
#

yeah thats where it says

robust breach
#

if so that’s crazy

#

node op

grim aspen
#

i want to have that job

quartz kindle
#

still, you can probably find asian developers charging $1-5/hr

robust breach
#

tru

burnt canyon
#

trying to code a bot atm I put my past behind me πŸ˜ƒ

#

going to make a simple one then add commands πŸ˜ƒ

ruby dust
#

cool

earnest phoenix
#

learn the language you're working with, do not faceplant into bot deving

#

im going to buy stopbeingabad.dev just for purposes like this

grim aspen
#

oh good tim's on

quartz kindle
#

making a bot is the same as making software, its meant for programmers

#

if you are not interested in programming, i suggest you try using discord bot maker

eager rivet
#

how do i make it so the bot joins the channel when i do -airhorn then plays airhorn sound then leaves
@client.command(pass_context=True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
play sound here unsure how
await asyncio.sleep(3)
voice_client = client.voice_client_in(server)
await voice_client.disconnect()

ruby dust
#

I get cringy when a see the word "programmers", especially when the same programmer calls themself like that

spring ember
#

But it's more forgiving and a good learning environment@quartz kindle

grim aspen
#

@quartz kindle how much do python developers get paid? per hour

quartz kindle
#

same or more than js, from what i saw

#

just google average wages

grim aspen
#

ah cool

quartz kindle
#

easy and portable languages are in high demand, because they increase productivity, you can do more in less time

ruby dust
#

and with less headache

quartz kindle
#

and javascript specially, because its highly compatibly with networking, and everyone wants everything connected these days

#

internet of things

#

javascript is basically the only language that can run as a desktop app, a phone app, and a website app all using the same code, without compatibility layers

#

with just minor changes and tweaks

#

like discord itself, you can use the app, or the website, its the same code

#

java comes close, but it needs java installed in your machine (and constantly suffers from security flaws)

burnt canyon
#

anyone know a good coding app where I can polace codes and shi

ruby dust
#

polace codes and shi?

burnt canyon
#

place codes and shit

ruby dust
#

place what codes

burnt canyon
#

smh

grim aspen
#

what library are you using?

#

or at least trying to

#

hello?

burnt canyon
#

mkdir my-bot
cd my-bot
npm init -y # generates you a minimal package.json file

grim aspen
#

oh nodejs

burnt canyon
#

yeah

#

just node or something else

#

cause this thing im reading says I should also use yarn or npm

grim aspen
#

use npm

burnt canyon
#

how do i download it?

quartz kindle
#

node.js is a program that runs javascript code

#

if you install node.js, it comes with npm

#

npm is node package manager, it manages and installs node.js packages

burnt canyon
#

oh rly when I installed it did not

#

nvm I dumb

#

thanks

#

where would I post my library

#

npm or node

quartz kindle
#

both node and npm are command line tools, you have to open a command prompt window (cmd), navigate to the directory you installed node, and run node or npm

burnt canyon
#

?

#

where do i post library

#

im idot

unique nimbus
#

google

burnt canyon
#

what?

#

this: mkdir my-bot
cd my-bot
npm init -y # generates you a minimal package.json file

quartz kindle
#

are you on windows or linux?

burnt canyon
#

windows

quartz kindle
#

mkdir is a linux command

#

it means create folder

grim aspen
#

no don't use mkdir

burnt canyon
#

whats the thing for windows?

quartz kindle
#

you can just right click and create a folder somewhere

burnt canyon
#

in...

quartz kindle
#

wherever you want to work on

burnt canyon
#

k

quartz kindle
#

wherever you want your bot to be installed in

burnt canyon
#

on in files?

quartz kindle
#

cd = change current directory

#

it works on windows too

burnt canyon
#

talk in english please

quartz kindle
#

so if you open a command line (cmd)

grim aspen
#

?

#

we are talking in english

quartz kindle
#

you can type "cd C:/yourfolder" for example

burnt canyon
#

my b talk in idot languarge

quartz kindle
#

do you know what cmd is?

#

command prompt?

burnt canyon
#

yea

quartz kindle
#

you have to open it and use it

burnt canyon
#

yes

quartz kindle
#

open cmd, and type "cd yourfolderpathhere"

#

your folder path meaning the folder you want to work on, the folder you created

#

where did you create the folder?

burnt canyon
#

in files

quartz kindle
#

what files

#

program files?

burnt canyon
#

in documents

quartz kindle
#

you need the full path

burnt canyon
#

k

quartz kindle
#

if you put it in documents, it will be something like "C:/users/yourusername/documents/files/yourfoldername"

#

but there is an easier way

#

open the folder you want to work on, hold the shift key, and right click

#

you will see an option "open command prompt here"

grim aspen
#

shit key

burnt canyon
#

ik lol

quartz kindle
#

shit key lmfai

#

fuck i need sleep

burnt canyon
#

it doesnt say open command window here

#

powershell tho

quartz kindle
#

you need to hold the shift key when you right click

burnt canyon
#

only says power shell

#

should I delete powershell

#

\Users\gavga\OneDrive\Documents\Llama Lounge Bot>

grim aspen
#

no don't

burnt canyon
#

would this be correctr: \Users\gavga\OneDrive\Documents\Llama Lounge Bot

quartz kindle
#

yes, it looks correct. you need to get cmd to find it

west spoke
#

win + r

quartz kindle
west spoke
#

and then type in cmd

#

i think

#

for win 10

quartz kindle
#

your cmd needs to say the full path of the folder

#

so you know its working in the correct folder

#

after you find the folder, type npm --v to see if its working

#

if everything is correct, you should see something like this (the version number of your npm):

#

then you can start installing npm packages

burnt canyon
#

hold up

#

I just replaced powershell with command

#

then when i do Shift + right click it dont come up

quartz kindle
#

try restarting your computer, or you're right clicking the wrong thing, you have to right click an empty area inside the folder

#

there are plenty of guides on the internet too, try researching a bit on basic node.js guides. i need to go to sleep, good luck!

gritty bolt
#

`events.js:188
throw err;
^

Error: Unhandled "error" event. ([object Object])
at Client.emit (events.js:186:19)
at WebSocketConnection.onError (/home/ubuntu/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:374:17)
at WebSocket.onError (/home/ubuntu/node_modules/ws/lib/event-target.js:128:16)
at emitOne (events.js:116:13)
at WebSocket.emit (events.js:211:7)
at _receiver.cleanup (/home/ubuntu/node_modules/ws/lib/websocket.js:211:14)
at Receiver.cleanup (/home/ubuntu/node_modules/ws/lib/receiver.js:557:13)
at WebSocket.finalize (/home/ubuntu/node_modules/ws/lib/websocket.js:206:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
events.js:188
throw err;
^`
How do I fix this error?

quartz kindle
#

client.on("error", do something)

burnt canyon
#

will it be fine if I use powershell?

#

cause the thing isnt working

west skiff
#

what are some helpful languages for making code blocks look nice, specifically stuff like ```md

  1. foo (bar)
  2. two (yes)```
empty owl
#

wghat

west skiff
#

I remember seeing a list of them somewhere but idk where

#

the one I'm thinking of makes the numbers red I think and the parenthesis blue

grim aspen
#

ohhhh

#

you mean

#

if(msg.content === 'foo')

#

msg.channel.send('bar!')

#

i saw that too

#

i'm not sure about the two and the yes though

#

or maybe i saw it as async msg or something else

#

function i mean

gritty bolt
#

thanks

amber fractal
#

foo and bar are usually placeholders

high lava
#

I want to be able to delete a message if the collector doesn't receive anything in 30 seconds. After 30 seconds are up the collector returns an empty array, but it doesn't seem to want to run anything after that

const input = await m.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time'] });
if (!input) return msg.delete();
#

And I do have msg defined elsewhere and it does delete the message for other options

amber fractal
#

did this help?

high lava
#

Trying it out

amber fractal
#

That will only work if it returns an empty array, I thought collectors returned collections

high lava
#

Fucking. It does

#

I'm dumb treating it like an array

#

That didn't work as well

amber fractal
#

then

#

!input.first() might work

high lava
#

Hmm. That didn't work either actually

#

It seems to just stop entirely if it doesn't collect anything

west skiff
#

what

#

no I was talking about literal code blocks @grim aspen

#

also I figured it out, I'm using md

grim aspen
#

oh

west skiff
#
1. Song name <channel>
2. Song 2 <channel 2>```
high lava
#

Apparently this has no good async support for errors

west skiff
#

what lib?

high lava
#

djs

west skiff
#

oh ok idk anything about that

high lava
#

@amber fractal For whatever reason, if you add the errors: parameter to it, it causes the code to completely halt

#

I thought it just provided a simple reason for the error, but the more you know

amber fractal
#

wait I'm an idiot

#

put it in a try catch

#

the catch will be the timeout

#

delete in there

#

I believe that should work

grizzled spruce
#

Anyone know how to make a bot respond to commands when you send them to it in DMs? I use discord.js

high lava
#

By default it should do that

#

Unless you tell it not to

grizzled spruce
#

Really? I should test that. Thank you

high lava
#

I'll keep this one simple msg.react('1️⃣'); doesn't work and I'm trying to get the 1⃣ reaction to appear. It keeps telling me it's an unknown emoji

#

np

pallid zinc
high lava
#

um. collected. () does nothing

#

If collected is a function then you want to do await collected()

amber fractal
high lava
#

wait. what

#

how

amber fractal
#

No idea why yours says unknown emoji

high lava
#

doing ':one:' causes it to say it's unknown as well

amber fractal
#

well that isnt an emoji resolvable

#

1⃣

#

that's what you have in there?

#

that's what's on my clipboard

high lava
#

Yeah

#

That's what I used

amber fractal
#

weird

high lava
#

Yeah. I can't figure out how to use the numbers

#

Everything else works fine

amber fractal
#

Hold up

#

I got different outputs using ' and "

#

but they still both worked

#

Nvm my bot was just being dumb

high lava
#

There has to be some other identifier for them

#

I'll try using my eval and see what it outputs as the input

#

Oh. Yeah. It works on that...

#

Hmm

hybrid pecan
#

it seems like 1️⃣ doesn't work, you have to use # + ⃣ for it to recognize what you are trying to send

#

but if you copy that box and type a number and then paste the box it seems to work fine

amber fractal
#

well yeah, that's the native emoji

#

the one he used

high lava
#

I'm still confused

#

As to why it's not working

#

Doing 1⃣ with the eval worked

#

I had msg defined as await createList() which returns message.channel.send(), and it works for deleting but wont add the damn reaction

grizzled spruce
#

Hmm I checked and removed the DM commands don’t work here thing and my bot still won’t respond to commands sent to it in DMs. Any fixes?

fiery stream
#

Yo

#

Have anyone used auth0 strategy before

#

Its kinda really hard

#

I mean not hard but confusing

slim heart
#

Does anyone know the Trello api here?
I'm struggling with Custom Fields

fiery stream
#

@slim heart i think i used it hefore

slim heart
#

Im trying to update a custom field like so
t.makeRequest("put", "/1/card/" + te + "/customField/5c93081b6f265a8b62226f90/item", {idValue: "5c93081b6f265a8b62226f90", value: {"text": "test"}}, a)
(te being the card id, everything about the id's etc. are correct)
but for some reason it keeps saying Invalid custom field item value

#

@fiery stream

shy rose
#

anyone familiar with C
void something(char **aVar)
How do i hand a 2 char array into this?

char x[2][1] = {{"a"}, {"a"}};
something(x);

Is wrong i can already tell so what do i do without changing function arg

silent cloud
#

guys

#

one man say me about add file watch.json in my bot

#

what is does this code i dont understand?

jagged birch
silent cloud
#

ye i saw this

#

but what code does

earnest phoenix
#

@silent cloud it make refresh your bot when something will change

mossy vine
#

@silent cloud that json file is just giving instructions to glitch

fiery stream
#

please help with auth0

mossy vine
#

@fiery stream just post your question or issue

fiery stream
#

I cant manage to pull data from twitters api using auth0

#

Help...

pallid zinc
#

What to help

earnest phoenix
#

@fiery stream yes, what to help?

fiery stream
#

Auth0

#

@earnest phoenix do u know it?

earnest phoenix
#

Nope, aby you need it?

fiery stream
#

Yep really badly

jagged stream
#

Does anyone know how to setup your bot to use the discordbots api in discord.py rewrite

slender thistle
#

Use in what way?

unique nimbus
#

Read the docs

jagged stream
#

to add voting support

#

i did read the docs

#

i used the example but pip fails to install and gives me an error when i nstall it

slender thistle
#

I bet that's pip2 issue

#

You migjt want to use webhooks for that

jagged stream
#

k

#

how would i use them

pallid zinc
#

What

jagged stream
#

how do i use the webhooks

ruby dust
#

Generally webhooks are part of webservers, but you can Google what webhooks are

slender thistle
#

For Python, you can use Flask

sinful lotus
#

webhooks are basically server where you do post / get request from

pallid zinc
#

And for node.js

crystal spear
#

I just saw a lot of bots whose link was changed

ruby dust
#

it's called getting a certification

crystal spear
#

ah

fiery stream
#

Umm

grizzled spruce
#

I’m having issues with a command. I recently added a command that allows me to change the prefix for the bot on a server, but for some reason, it takes like 5 uses of the command before it actually does anything. Any help? (I’m using discord.js)

mossy vine
#

we dont magically see your code

grizzled spruce
#

lol I’ll send it one second

#
const fs = require("fs");

module.exports.run = async (bot, message, args) => {
if (!message.member.missingPermissions(`ADMINISTRATOR`)) return message.reply("Only Administrators have this ability.")
if(!args[0] || args[0 == "help"]) return message.reply("Usage: !prefix <desired prefix here>")

let prefixes = JSON.parse(fs.readFileSync("./prefixes.json", "utf8"));
 
prefixes[message.guild.id] = {
  prefixes: args[0]
};
  
  fs.writeFile("./prefixes.json", JSON.stringify(prefixes), (err) => {
    if (err) console.log(err)
  });
  
  
  let sEmbed = new Discord.RichEmbed()
  .setColor("#FF9900")
  .setTitle("Prefix Set!")
  .setDescription(`Set to ${args[0]}`);
  
  message.channel.send(sEmbed);
  
  
}


module.exports.help = {
  name: "prefix"
  
}```
earnest phoenix
#

@grizzled spruce where do you host your bot?

grizzled spruce
sinful lotus
#

@grizzled spruce Could be because you are using json

#

as well thats asynchronous

earnest phoenix
#

Glitch cant update your code

#

Using fs

#

Use an database

sinful lotus
#

means it wont wait for the prefix to actually write before you can use it

earnest phoenix
#

Nope, I tryed it samr

#

I use an db

grizzled spruce
#

Ah

sinful lotus
#

well at the first place

#

you shoudnt really use a json storage in a public bot

#

if you dont know how to use a database, use enmap

#

or keyv

#

they do the db writes for you

#

you just need to know how a javascript map works

fiery stream
#

Yo

#

Nano

earnest phoenix
#

Sorry not this

grizzled spruce
#

Yes...?

sinful lotus
#

enmap is really simple

#

so if you are worried about it making hard

#

thats isnt a thing to worry about

grizzled spruce
#

Ok

fiery stream
#

Are u sure that u sue that u are using that peefix in message.js

#

Event

grizzled spruce
#

Lemme checkkkkk

fiery stream
#

Lemme see message.js event code

grizzled spruce
#

As it appears I don’t even have a message.js

sinful lotus
#

how your code works?

#

first of all how you did modularized it?

grizzled spruce
#

I’m sorry could you be a bit simpler? I’m still trash at all the terms

sinful lotus
#

you have module.exports

#

so Im assuming you splitted your bot into multiple files

grizzled spruce
#

Yes

sinful lotus
#

in simple terms how you did do it?

fiery stream
#

Thats all good but your prefix code was so complexly coded

sinful lotus
#

its not really complexly coded

#

its just hard to read

grizzled spruce
#

I used terminal to load discord.js and then added .js and .json flies to build the bot

fiery stream
#

I mean it was weird way

grizzled spruce
#

It was based off of a tutorial

fiery stream
#

Ohh

#

Use enmap it’s better

sinful lotus
#

well first thing

#

do you know how to use a map

grizzled spruce
#

I don’t...

sinful lotus
#

then its time for you to learn them

#

discord.js uses maps a lot

#

collection is a map

grizzled spruce
#

Ok

sinful lotus
#

if you know what is a collection in d.js

#

then that is map

grizzled spruce
sinful lotus
#

for example

#

client.guilds

#

Im assuming you use that sometimes

grizzled spruce
#

I do

sinful lotus
#

thats a map

#

on pulling a guild data, what do you do?

#

use .get()

#

enmap works like that

#

but ofc you need to set a setting inside of it first

grizzled spruce
#

Ahhh

#

I see.

sinful lotus
#

so use .set(guild_id, { prefix: someprefix })

#

its really easy and I dont think you would have problems on it

grizzled spruce
#

Ok

fiery stream
#

Lol

grizzled spruce
#

Thank you

fiery stream
#

Its easy i can walk u through

grizzled spruce
#

Nah that’s ok

fiery stream
#

@sinful lotus yoo

sinful lotus
#

?

fiery stream
#

Umm have u used auth0

earnest phoenix
#

@fiery stream what is that for?

fiery stream
#

Web

earnest phoenix
#

Lol

fiery stream
#

Please help

west spoke
#

What language @fiery stream

fiery stream
#

Javascript

west spoke
#

Mmh I'm of no help then

fiery stream
#

Ohh

#

What lang do u know it in

west spoke
#

Python non-rewrite

fiery stream
#

Off

west spoke
#

xd

fiery stream
#

Oof

#

Lol

#

I made a thing to stalk people

slender thistle
#

Stalk?

fiery stream
#

On insta

#

Yee

slender thistle
#

πŸ€”

#

Tf

fiery stream
#

Go check it out

#

@slender thistle did u

slender thistle
#

I don't get what you mean by "stalking" in this case

#

All I see is literally just getting Instagram pfp

earnest phoenix
#

Yes, only pfp

fiery stream
#

Thats the thing u supposed to get full pfp

slender thistle
#

"Stalking"

#

Hell, I could grab that through inspecting element code

west spoke
#

xd

obtuse vortex
#

Hi,

#

I'm trying to make my bot react with the emoji 1⃣ , but if I use \1⃣, it says 'unknown emoji'

thick bay
#

\1⃣

#

welp

#

use

obtuse vortex
#

I've tried copying the ID but doesnt seem to work either

earnest phoenix
#

unicode emojis dont have ids

#

that emoji is consisted of two different ones which is why escaping it doesn't work

#

combine digit 1 and enclosing keycap into one

obtuse vortex
#

hmm

high lava
#

Lol. I have the same issue

obtuse vortex
#

Yeah no idea how to solve it yet

earnest phoenix
#

i literally said above how to lol

obtuse vortex
#

What do you mean by combine both of them

earnest phoenix
#

literally put them next to each other

#

1⃣

high lava
#

⃣1

#

lol. ok