#development

1 messages · Page 641 of 1

west spoke
#

Got ponged here

frail ocean
west spoke
smoky mica
#

how can you purge more than 100 messages like dyno/mee6

earnest phoenix
#

you don't

#

you need to send the request in batches for bulk deleting more than a 100 messages

spare goblet
#

you can't, 100 is max, hence this

devout flicker
#

can someone tell me how sharding with different servers work?

#

like

  • s1 has 4 shards
  • s2 has 4 shards
    Total 2x4
smoky mica
#

Oh.

#

Thanks yall :)

idle basalt
devout flicker
#

does not answer my question

#

i know how sharding works if you just use a single server

#

but im talking about multiple

idle basalt
#

ohh my bad i misread

#

youd have to communicate between the two somehow. i dont know much about server architechture maybe someone else can provide an actual solution

#

obviously you already knew that ^ lmao

#

personally id look into creating an api or communicating between the two with web sockets. those would be my first naive solutions

devout flicker
#

tho i thought it would not be a problem due to discord automatically assigning shards to guilds

#

but, it resulted into duplicate messages ofc

stray garnet
warm flame
#

we can't read that

west spoke
#

^

mossy vine
#

open in browser and zoom lul

#

but did you try reading the error

warm flame
#

yeah i know but like if he wants us to read it here he could at least crop it lol

spare goblet
#

Wrap your code/text and re-send screenshot please. It's a syntax error p sure, you probably missed or added an extra bracket somewhere

idle basalt
#

^

warm flame
#

also we need to see the error

idle basalt
#

prob missing the closing paren to your callback

spare goblet
#

Hover over the red dot and you'll see what the error is

#

You didn't close the brackets during your resolve(s)

stray garnet
#
 
module.exports.run = async (bot, message, args) => {
 message.delete();
  
 if(message.author.id === "523885075776143360") return message.reply('No Permissons to Run This Command!').then(msg => msg.delete(15000));
    let bicon = bot.user.displayAvatarURL;
    let string = '';
    bot.guilds.forEach(guild => {
    string += guild.name + '\n';})
    let bt = bot.user.username;
    let botembed = new Discord.RichEmbed()
        .setColor("#000FF")
        .addField("Servers In", string)
        .setTimestamp()
        .setFooter("Command Ran By: " + message.author.username, message.author.avatarURL);
    message.channel.send(botembed);
}
 
module.exports.help = {
    name: "serverlist"
}```
warm flame
#

three ` at the beginning and end please

stray garnet
#

@warm flame :)

earnest phoenix
#

You have forgot a )

#

And a })

stray garnet
#

oh shit

earnest phoenix
#

close the bot.guilds.forEach

mossy vine
#

this is why you dont code on mobile without a proper code editor

earnest phoenix
#

and the .then(msg

devout flicker
#

or await

earnest phoenix
#

?

devout flicker
#

since its in a async func

earnest phoenix
#

What?

stray garnet
#

@earnest phoenix wdym with close

devout flicker
#

@stray garnet ur brackets are not closing foreach

earnest phoenix
#

@stray garnet just add ) })

#

To the end

stray garnet
#

k

#

didnt fixed it

spare goblet
#

can you hover over the red dot

#

and let us know what the error said?

stray garnet
#

wait

devout flicker
#

its a breakpoint

stray garnet
#

@spare goblet

idle basalt
#

lmao

spare goblet
#

it's in index.js, not serverlist.js ??

idle basalt
#

props.help.aliases is undefined

earnest phoenix
#

no its in serverlist.js its just the handler

spare goblet
#

👀 o

idle basalt
#

you need to create an aliases property in that help section

earnest phoenix
#

^

idle basalt
#

your handler is erroring because it doesnt skip commands without aliases

stray garnet
#

k

idle basalt
#

so either add that feature or create an empty aliases array

stray garnet
#

@idle basalt okay thx works

idle basalt
devout flicker
#

(bot.guilds || []).forEach

stray garnet
#

WTF

earnest phoenix
#

Or map guilds in a const

stray garnet
#

my own id is not recognized

#

I Put it in the Code

earnest phoenix
#

Add !

#

Need to be a negation

#

Wtf

#

Replace === by !==

stray garnet
#

Ok

earnest phoenix
#

ye

#

I had that problem before with eval

#

but I figured it out

#

¯_(ツ)_/¯

#

does d.js have something to log out with? so i could log in again?

amber fractal
#

could always process.exit()

earnest phoenix
#

there is destroy

#

you'd have to recreate the client though

mossy vine
#

theres .destroy

brittle wasp
#

Hello, how can i check if user upvoted bot ?

#

C#

mossy vine
#

im not aware of a dbl lib for C#

#

oh nevermind

#

@brittle wasp

brittle wasp
#

THANKS @mossy vine

#

checking now

west spoke
#

@brittle wasp html requests

static matrix
#

sknekfetch module not found

#

Error

west spoke
#

um

#

show screenshot and code

static matrix
#

Ok

west spoke
#

..

static matrix
#

Oh

#

Wrong ss

#
throw err;4:11 PM
^4:11 PM
4:11 PM
Error: Cannot find module 'snekfetch'4:11 PM
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)4:11 PM
at Function.Module._load (internal/modules/cjs/loader.js:508:25)4:11 PM
at Module.require (internal/modules/cjs/loader.js:637:17)4:11 PM
at require (internal/modules/cjs/helpers.js:22:18)4:11 PM
at Object.<anonymous> (/rbd/pnpm-volume/ced3d9fd-e946-4e96-92ae-da8d08672ba8/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/util/Util.js👍81)4:11 PM
at Module._compile (internal/modules/cjs/loader.js:701:30)4:11 PM
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)4:11 PM
at Module.load (internal/modules/cjs/loader.js:600:32)4:11 PM
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)4:11 PM
at Function.Module._load (internal/modules/cjs/loader.js:531:3)4:11 PM
2 minutes ago
internal/modules/cjs/loader.js:5844:11 PM
throw err```
#

Lazy.

split hazel
#

@static matrix Can you try running npm install snekfetch

west spoke
#

^

split hazel
#

If it doesnt work let me know

#

Or if you're using pnpm use pnpm

static matrix
#

Ok wait

amber fractal
#

snekfetch is also deprecated

#

Just a warning

static matrix
#

@split hazel

#

@amber fractal my bot is not working

#

My bot is worked 2 days ago

split hazel
#

You're using glitch right?

static matrix
#

Yes

#

Im not changed my project

split hazel
#

It looks like the os is denying access

#

And i doubt glitch gives you root access

#

Best to contact glitch themselves

brittle wasp
#

@west spoke thanks

static matrix
#

Ok

neat falcon
#

lol glitch

split hazel
#

GWloopyBlobShrug decent place for small bot & if you don't have money

#

glitch would be able to barely put my bot on 'online'

#

before dying out

west spoke
#

lmao

neat falcon
#

no glitch === less shitty bots

west spoke
#

Yes

quartz kindle
#

afaik you have to install using their "add package" button, else it doesnt work

smoky mica
#

uhm a bit dumb question i guess but can you like "clean" your bot's cache or whatever

slim heart
#

restarting

smoky mica
#

that doesn't work

#

my bot said its in a big server and i googled it and found it and joined it and noticed it wasn't there anymore but my bot said it's there, ehhh idk

slim heart
#

yea it does, everything in the cache will be removed obv, and then when it starts the vital create events will go off

#

they can also by all means hide bots in other channels

#

so you might just not be able to see them

smoky mica
#

uhh true

#

gimme a sec

#

i can see other bots

ember atlas
#

A restart command is like hella easy to make righti?

slim heart
#

doesnt mean its not there @smoky mica

#

@ember atlas yea

#

@smoky mica try doing an eval and see if its in there

smoky mica
#

i'm gonna be honest, i never made the eval command

ember atlas
#

It’s just process.exit(1); right?

slim heart
#

mhm

ember atlas
#

And then do you have to say bot.login(“token”) or does r auto do that

slim heart
#

process.exit will stop the whole program, if u have a restart system set up itll just run again

ember atlas
#

And if I don’t have restart system setup?

grim aspen
#

like pm2

mossy vine
#

use something like pm2

slim heart
#

set one up :p

ember atlas
#

I could

grim aspen
#

use pm2

ember atlas
#

Usually I just do pm2 restart 0 in the terminal :p

mossy vine
#

npm i pm2 --global

slim heart
#

guys you dont have to repeat yourself cmon

smoky mica
#

what really is the advantage of eval? i've never understood it 😅

slim heart
#

you can run code on the go

mossy vine
#

you get to manually make your bot do things without editing a file

grim aspen
#

running code outside a bot

smoky mica
#

OH

slim heart
#

test new things, do quick changes etc.

mossy vine
#

cat out your token

ember atlas
#

Eval is hella useful

mossy vine
#

i mean what

ember atlas
#

Hide your token in eval tho

mossy vine
#

mmm just dont make it open

smoky mica
#

yeah haha ofc

mossy vine
ember atlas
#

Ya. No dev does that.

smoky mica
#

i'll just limit it to my id

ember atlas
#

Ye that’s good

mossy vine
#

eh ive seen open eval and even open exec before

smoky mica
#

eval is useful af then :o

spare goblet
#

I use eval to fix db errors mmLol

#

It's really useful ye

mossy vine
#

i use exec to restart everything from anywhere

grim aspen
#

i used eval to check my guild count for my bot

mossy vine
ember atlas
#

Super useful

smoky mica
#

thnaks y'all 🤠

ember atlas
#

You can run any code, set your client avatar, and a shit ton more

#

:)

smoky mica
#

what do yall use to host your bot atm

mossy vine
#

a vps

slim heart
ember atlas
#

Currently mine is in development so my pc

mossy vine
#

cheap and meh service

slim heart
#

this isnt dev related

mossy vine
#

it is tho

#

we are discussing develpoment

ember atlas
#

Gonna do a vps soon

slim heart
#

not development, this is conversation

mossy vine
#

eh ok

slim heart
#

"(bot) development" too :p

smoky mica
#

its alright i'm done anyway haha

ember atlas
#

Does anyone have a guide to do a restart system?

mossy vine
#

just use pm2

#

it works with literally any project, not just js

#

it gives you useful data

#

and is a breeze to set up and manage

ember atlas
#

Also what are these exec commands ppl have?

slim heart
#

child_process#exec

ember atlas
#

What does it do.

slim heart
#

executes in cmd

ember atlas
#

So it’s like using the cmd but like good for on the go ?

smoky mica
#

trackpad, check out oxidehosting

slim heart
#

oh also @mossy vine u said u were doing the .exec to do pm2, theres a pm2 package btw

#

pm2.restart("all")

mossy vine
#

cool but exec is better mmulu

slim heart
#

rather than having to open up a whole child proc

ember atlas
#

Can you use that in code for a good restart system?

slim heart
#

yea

ember atlas
#

Thanks everyone.

smoky mica
#

so i put message.guild.leave() and tried the command and the bot left my server and scared me thinking it left from every server lmao

#

how can i make it so that it leaves according to the ID

split hazel
#

<client>.guilds.get('ID').leave();

untold matrix
#

I just got a question on axios, how do I get axios to get the data of the latest object, like response.data.attacks.[latest].etc

smoky mica
#

thank you speedy

earnest phoenix
#

I have been trying to make leveling system (javascript) from like 1-2 weeks ago and still not working cz_power_cry

warped willow
earnest phoenix
#

@earnest phoenix Okay?

#

Do you need help

#

Uh yeah I think so

#

Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem.

#

Well It explains my problem, I need help making leveling system..

#

What language ?

#

js

split hazel
#

We won't spoonfeed you the code, we can only give parts & help you with errors/bit of code. You can google & use tutorials from websites as seen above ^

molten yarrow
#

Enmap based System works fine aswell

untold matrix
#

How do I get the latest result from Axios?

#

There is nothing on google I can find for the past few days bout getting the latest result

earnest phoenix
#

axios.get('')?

untold matrix
#

Yeah but what I mean is

#

response.data.attacks.[latest].etc

mossy vine
#

mmmmmm that seems right. a quick look at the documentation might help you

untold matrix
#
"74752697": {
            "timestamp_started": 1561281350,
            "timestamp_ended": 1561281356,
            "attacker_id": 2309697,
            "attacker_name": "CodeD_AUS",
            "attacker_faction": 22295,
            "attacker_factionname": "-",
            "defender_id": 2302988,
            "defender_name": "DerekkG98",
            "defender_faction": 0,
            "defender_factionname": null,
            "result": "Mugged",
            "stealthed": 1,
            "respect_gain": "0.6669",
            "chain": 1,
            "modifiers": {
                "fairFight": "1.71",
                "war": 1,
                "retaliation": 1,
                "groupAttack": 1,
                "overseas": 1,
                "chainBonus": 1
            }
        },
        "74752779": {
            "timestamp_started": 1561281477,
            "timestamp_ended": 1561281492,
            "attacker_id": 2309697,
            "attacker_name": "CodeD_AUS",
            "attacker_faction": 22295,
            "attacker_factionname": "-",
            "defender_id": 1684520,
            "defender_name": "bwarbwar",
            "defender_faction": 0,
            "defender_factionname": null,
            "result": "Mugged",
            "stealthed": 1,
            "respect_gain": "1.79138",
            "chain": 2,
            "modifiers": {
                "fairFight": "2.81",
                "war": 1,
                "retaliation": 1,
                "groupAttack": 1,
                "overseas": 1,
                "chainBonus": 1

I am trying to get the latest number

mossy vine
#

logging response.data might help you a lot in finding the issue

#

oh

untold matrix
#

It isnt an issue

mossy vine
#

i assume the higher the number is the newer it is?

untold matrix
#

I need it to get the latest number which is 74752697

#

Yes

#

So response.data.attacks[74752697].etc

mossy vine
#

parse the json (aka convert it to an object), get the keys from it, sort the keys, get the value of the highest key from your sorting, deal with the data

untold matrix
#

Aight I'll try that and figure it out thanks

modest pendant
split hazel
#

CSS

modest pendant
#

but i don't know what is the thing i need type. that is my problem,

earnest phoenix
#

look

#

That

modest pendant
#

@earnest phoenix thanks for that. but i already find one

earnest phoenix
#

okay

split hazel
#

If you don't know what CSS is, you should try learning it a bit before attempting to create "Pure CSS Rainbow Text with Animation Effects"

grim aspen
#

when did skysilk require a private key?

earnest phoenix
#

weird

grim aspen
#

i don't have a private key

#

no wonder

#

some dumbass got access to my account

#

i'm infuriated

#

i've had it

#

i'm not moving back to skysilk

dapper glade
#

I don’t understand what to do to get vote only commands. Please help

earnest phoenix
#

store user data

dapper glade
#

Ok

earnest phoenix
#

when a user vote store of the data of the user, with like 'voted'

west spoke
amber fractal
#

This is in d.js and the role is above everyone

#

First world problems

#

amirite

earnest phoenix
#

Why does the path look like its trying to add a role above itself to a guildMember

amber fractal
#

The role was above everything

#

I fixed that tho

earnest phoenix
#

@amber fractal d.js bad

drowsy sentinel
#

@earnest phoenix Keep it on topic please. 👍

bright bone
#

hey someone knows an API to get lastest football/soccer matches? sorry for my english

cunning oxide
#

@bright bone try googling questions before asking them here. I’m sure it’s readily avail.

bright bone
#

I searched in Google but that APIs have only 10 requests per minute.. (the free version)

floral bloom
#

Why do I keep getting this error when I have discord.js in my package and I use require("discord.js"); in my code?

- Error: Cannot find module 'discord.js'
#

Ping with response, please.

earnest phoenix
#

what hosting do u use?

spare goblet
#

@floral bloom Hi! You're missing the module in package.json

#

So just do like npm install discord.js

floral bloom
#

Hold on.

spare goblet
#

In console

spare goblet
#

Oh didn't see that previous. Just try install again I guess

#

Yeah it should

#

In console of glitch you have to do pnpm so

#

just reinstall by doing

#

it happens sometimes. Glitch is glitchy mmLol. Once reinstalled all npm packages you'll be good

earnest phoenix
#

Ye

#

that happened to me

#

sad times

#

lol

floral bloom
#

Lol, ok thanks

spare goblet
#

Have a good day, feel free to drop a message if you have any more issues. blobsmilehappyeyes

floral bloom
#

Ok, you too!

#

@spare goblet Well, I sent pnpm instal discord.js to the console.... it didn't work

spare goblet
#

@floral bloom pnpm install discord.js

#

did it respond

floral bloom
#

It said: Usage: pnpm [command] [flags]
Also, now it won't let me type in the console... hold on

#

Hm, it worked

spare goblet
#

@floral bloom great congrats blobsmilehappyeyes you missed out an l the first time

floral bloom
#

Gotta add my token

#

Yes, I did... thanks! 😄

latent oasis
#

Any way to generate captcha on js?

spare goblet
#

I'd use a package to do it If I had to mirateehee

latent oasis
#

What package?

sinful lotus
#

probably canvas and generate it yourself

latent oasis
#

Ok

#

Thx

pallid zinc
#

How can I stick my header in html

earnest phoenix
#

javascript weird

#

i got an array ```json
[ 'memes\r', 'memes2\r', '512\r', 'oofergang\r', 'triangles\r', '' ]

and the `array.size` is undefined
#

why ;-;

languid dragon
#

]]ev [1,2,3].length

covert turtleBOT
#
3
languid dragon
#

@earnest phoenix ^

earnest phoenix
#

i thought it's size

#

it should be size

languid dragon
#

why should it be size

#

everything is length

earnest phoenix
#

cause google

languid dragon
#

i think the only thing that is size, is a map

earnest phoenix
#

ahh

#

yea

#

okay thanks

languid dragon
#

]]ev const m = new Map([[1, 2], [3, 4]]); m.size

covert turtleBOT
#
2
earnest phoenix
#

anotha issue

languid dragon
#

?

earnest phoenix
languid dragon
#

wot

#

the for statement can't do that lmao

earnest phoenix
#

but it does

#

wait no

#

no it doesn't

#

ohhh now i get it

#

okay issue solved

languid dragon
#

lmao

earnest phoenix
#

it was printing it out fine

#

but since length startsfrom 1 and not 0

#

last one was ubdefined

#

so i thought it was the length console log

#

i'm dumb

mossy vine
#

@earnest phoenix if you simply want to loop over the elements of an array, <Array>.forEach() is a cleaner solution

late hill
#

for of superior

lofty bane
#

hello guys

#

need help 😃

#

TypeError: Cannot read property 'roles' of null
what it mean ?

sinful lotus
#

message.member is null

lofty bane
#

mmmmmmm

#

a weeb

#

Ty ❤

earnest phoenix
#

Uncaught Promise Error: { DiscordAPIError: Missing Permissions

at item.request.gen.end (/rbd/pnpm-volume/b5993b4d-5469-4f53-a0d7-988a88170f12/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79:15)

at then (/rbd/pnpm-volume/b5993b4d-5469-4f53-a0d7-988a88170f12/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:215:21)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:182:7)

name: 'DiscordAPIError',

message: 'Missing Permissions',

path: '/api/v7/guilds/264445053596991498/members/390811484092891147',

code: 50013,

method: 'PATCH' }

#

yardım edecek varmı 😄

spare goblet
#

@earnest phoenix the bot is missing permissions to do whatever it's trying to do

earnest phoenix
#

what do you need to do for her?

spare goblet
#

You need to add permissions to them in whichever server that used the function that it doesn't have permissions in 🤠

#

Like if you're trying to get bot to ban someone it needs banning perms

earnest phoenix
#

hm thanks ^^

spare goblet
#

No prob have a good day. blobsmilehappyeyes

lofty bane
#
2019-06-24T08:50:25.862531+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-06-24T08:50:25.915858+00:00 heroku[web.1]: Process exited with status 137
#

:l

#

i searched it on google but didnt solve it

#

its on all my projects

#

please help guys

quartz kindle
#

Heroku dynamically assigns your app a port, so you can't set the port to a fixed number. Heroku adds the port to the env, so you can pull it from there.

modest pendant
earnest phoenix
#

that is a very nice button

#

im using that

modest pendant
#

@earnest phoenix i trying to find it

#

can you help me?

earnest phoenix
#

its kinda easy

#

you have some box-shadow

#

some border-radius

#

and some white color

#

and some #?????? background-color

#

lets find those colours

modest pendant
#

all this what we need for the button?

earnest phoenix
#

looks like it

modest pendant
#

.btn-blue {
background: #6666ff !important;

earnest phoenix
#

seems to be #FFB100 for background

#

for the one in the picture

modest pendant
#

let me check with inspect

#

took from

#

here

earnest phoenix
#

lol why

modest pendant
#

lol please help me,

earnest phoenix
#

don't just copy someone else's

#

use your own

modest pendant
#

ok,

earnest phoenix
#

or at least use it for something other than the invite button

#

so the css factors i can see

modest pendant
#

i will try to do my own.

#

dude you language at css is good?

earnest phoenix
#

i mean fairly i guess

#

.buttton {
    background: #ffad00;
    box-shadow: 0 5px 40px 0 rgba(255, 173, 0, 0.3);
    width: 100px;
    border-radius: 100em;
    padding: 10px;
}```
#

i guess so

modest pendant
#

wait.

earnest phoenix
#

idk why it says css

#

there

modest pendant
#

let's check if you right or not,

#

Wow

#

Dude

#

Thanks

twilit rapids
#

How can you even change the buttons on the site Thonk

earnest phoenix
#

css

twilit rapids
#

But like, how do you know which button you are changing

slender thistle
#

Preview

earnest phoenix
#

you don't. it's a matter of fun

#

or u can use inspect element if you're really gay

twilit rapids
#

Where can you change it?

slender thistle
#

Long description

twilit rapids
#

oki

maiden fractal
#

Lol

bleak vortex
#

my bot starts, is online for like 5 minutes and then goes offline. Why?

earnest phoenix
#

because you're using free hosting

pallid zinc
#
if(messageReaction.emoji.name === "👍")
 {
 console.log(user.username); 
}
 }); ```
pale marsh
#

@bleak vortex what lib?

pallid zinc
#

It's not sending any message in console

pale marsh
#

Are you sure the emoji.name is the unicode character for the emoji though?

bleak vortex
#

sorry but what is lib? @pale marsh

slender thistle
#

Library

pallid zinc
#

Hmm

bleak vortex
#

ok

#

discord.js

pale marsh
#

Does it dump any errors to the console?

bleak vortex
#

nope

pallid zinc
#

Idk if it is or not

#

?

pale marsh
#

Test it first by logging messageReaction.emoji.name to the console before the if statement

pallid zinc
#

Ok

#

Nope

#

It's not working

warm marsh
earnest phoenix
#

because they're unicode and your console font most likely doesn't support rendering unicode chars

warm marsh
#

Yeah most likely

#

Was just cmd being salty.

stark beacon
#

yay im back. Looks like my BOT's don't wanna come online still though 😦

west raptor
#

give it a bit

earnest phoenix
#

how make level up messages on/off?

west raptor
#

store it

spare goblet
#

@earnest phoenix are you talking about in code or in a bot that's on dbl? if it's a bot on dbl you have to go to their support server

west raptor
#

if (!on) return

spare goblet
#

otherwise, save it in db and basically athis

earnest phoenix
#

im about code

spare goblet
#

yeah then save an option to on/off in db, and based off that setting, if it's off, then don't output things :)

west raptor
#

use something like mongodb, store guild settings and just if statement the rest

#

in a nutshell

earnest phoenix
#

yo yo

#

ok

#

.

#

Hello

#

@earnest phoenix Do you need help?

#

To post pics

spare goblet
#

This place is for asking questions about development, move to #memes-and-media thanks

earnest phoenix
#

ok sry

#

python db

#

also mongodb maybe supports python

#

use sql

slender thistle
#

There are Motor (async) and pymongo (sync)

earnest phoenix
#

I have a error in my bot

#
  throw err;
  ^
Error: Could not locate the bindings file. Tried:
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/default/better_sqlite3.node
#

there's even more

#

it'll be appreciated if someone could help

#

ping/dm if u can help me

umbral glacier
#

Can bot reply message with multiple images ?

earnest phoenix
#

no

#

uh yes, but not in one message @umbral glacier

#

it's one attachment per message, android used to allow multiple attachments in one message however they've fixed that since 3 months ago

frigid sun
#

Hey, I just wanted to ask if if/how you could accomplish a guild specific status (for example the bot is on 2 different servers and each one has a different command prefix -> on each guild it should show a different status with the guild specific prefix)

umbral glacier
#

gotcha

#

thanks for answer

earnest phoenix
#

@frigid sun no you can't

#

theoretically you can, but not really reliably

#

status is global

#

if you shard and the guilds happen to be on different shards you can have different activities

#

by statuses they mean game/activity

#

Bleh can't some1 help meh?

#
  throw err;
  ^
Error: Could not locate the bindings file. Tried:
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Debug/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/Release/better_sqlite3.node
 → /rbd/pnpm-volume/0fa62af4-d92b-449c-b3bc-8456d355e1c1/node_modules/.registry.npmjs.org/better-sqlite3/4.2.0/node_modules/better-sqlite3/build/default/better_sqlite3.node
#

Fugly error

#

stop copypasting the error

frigid sun
#

but i think i saw that before, for example the tony bamanaboni bot allows to change prefix and also displays it in status @earnest phoenix

earnest phoenix
#

it's clogging the chat and you posted it a few messages above

#

Chill lmao I just need help

topaz fjord
#

@earnest phoenix you can still do multiple attachments in one message in android

earnest phoenix
#

Like how tf will u know what is my erro?

#

can you?

#

With shard you can flexusma

topaz fjord
#

Yes

earnest phoenix
#

im pretty sure they've made it so the messages are split

#

uploading is concurrent now

frigid sun
#

jeah i tried that but then i would need to start a new shard according to guild count?

earnest phoenix
#

you can't define which shard will a guild go into

#

On android you can add multiple attachments but its not in one message

#

idk wtf i said

#

@earnest phoenix just read the error, bot can't found the directory

frigid sun
#

hm...

earnest phoenix
#

@frigid sun and yes

frigid sun
#

you have any other idea of displaying the current prefix?

earnest phoenix
#

and zero utility to do that just for a status

#

just,, dont show it in the status...?

frigid sun
#

yup thats the problem

earnest phoenix
#

i am reading it but cant solve it DoubleFacepalm

#

thats the reason why im here

frigid sun
#

any idea how I could display it, cause its pretty bad to not know a bots prefix xD

earnest phoenix
#

have a prefix command and allow commands to be executable by bot's mention

frigid sun
#

ah ok nice

#

thx

#

ill try that thanks ^^

earnest phoenix
#

and the mention take a args, dont forgot

frigid sun
#

sry what do you mean exactly?

earnest phoenix
#

if you have a say command or something else, if your prefix is @mention say hello you will not be able to use it anymore

#

because the say take already a args

frigid sun
#

no i dont have a say command

earnest phoenix
#
const Discord = require('discord.js');
const cooldown = new Set();
let cdseconds = 3600000;

module.exports.run = (bot, message, args) => {
	
	if(cooldown.has(message.author.id)) {
        message.delete();
        return message.channel.send("**❌ Cette commande possède un cooldown de 1 heure.**")
    }
    
const low = require('lowdb')
cooldown.add(message.author.id);
const FileSync = require('lowdb/adapters/FileSync')
const adapter = new FileSync('./db.json')
const db = low(adapter)
	
    
    
        var author = message.author.id;
        
    if (!db.get("credits").find({ auteur: author }).value()) {

        db.get("credits").push({ auteur: author, credits: 500 }).write()
 		
        } else {
  
          var usercreditsdb = db.get("credits").filter({ auteur: author  }).find('credits').value()
  
          var credits = Object.values(usercreditsdb)
          db.get("credits").find({ auteur: author }).assign({ auteur: author, credits: credits[1] += 500 }).write()   
    }
    message.channel.send("✅ **Vous venez de récupérer 500 crédits. Merci de patienter 1h avant de pouvoir effectuer encore cette action.**");
    
    setTimeout(() => {
        cooldown.delete(message.author.id)
    }, cdseconds * 1000)
}

module.exports.help = {
    name: "work"
}```

why my cooldown isn't work ? but is the same cooldown for my suggest command and it's fonctionnaly ^^
earnest phoenix
#

I need help with how do I check shards in a commando bot

#

my bot.js is broken T^T)

grim aspen
#

first, indentation needs fixing because i can't read anything from that picture

#

second does your bot come up with an error in console?

earnest phoenix
#

bot is working but i cant edit my bot

mossy vine
#

nice token leak

earnest phoenix
#

lmao

#

i want to fix it - -

grim aspen
#

show code, take out token for a sec

earnest phoenix
#

in pic not have token lmao---

#

Hey

#

@frail ocean bro in my server mee6 is offline what can i do

#

nothing

quartz kindle
#

Go to the mee6 server, not here

earnest phoenix
#

Do you want a joke?
@last mesa is the best discord developer ever in this world, and he has a most super bot @stuck harbor !!

#

ok

frail ocean
#

@karmic hatch As others said, we can't do anything as we are not a Mee6 developer or support server. Please wait for the bot to restart and come online. 😃

unique nimbus
#

yes

#

da

amber fractal
#

If you're using a lib it should be documented

cursive dagger
#

Anyone know how to set a per shard status?

earnest phoenix
#

No utility?

grim aspen
#

what library are you using? @cursive dagger

cursive dagger
#

@grim aspen raw http or d.py (not implemented)

grim aspen
cursive dagger
#

@grim aspen Its not in the d.py docs

grim aspen
cursive dagger
#

You have to use raw http

grim aspen
cursive dagger
#

Ty

slender thistle
mossy vine
#

with d.js does shard 0 handle all dms?

grim aspen
slender thistle
#

Shard 0 is DMs iirc

mossy vine
#

so a bot that only works in dms could get ratelimited if many people are using it at once?

slender thistle
#

I believe that ratelimit is per channel

mossy vine
#

ah

west spoke
#

No

#

If that was true Nekophone would be much faster

mossy vine
#

well fuck

static matrix
#

By bots are not working

#

After the discord crash

#

Help pls

#

I fixed

earnest phoenix
#

Ok

heady zinc
#

@mossy vine ratelimits are per channel

mossy vine
#

are dm channels seperate channels?

heady zinc
#

yes they are

mossy vine
#

but that "ratelimit / channel" thing doesnt apply to user accounts, does it?

heady zinc
#

pretty sure they have the same rules as regular text channels

mossy vine
#

hmm

#

guess ill try some stress testing

cursive dagger
#

Cyber gonna selfbot awow

glossy steppe
#

How do i code

cursive dagger
heady zinc
#

yeah they have the same ratelimits

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.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

delicate zephyr
#

@sage bobcat It should be ../

mossy vine
#

lmao will fucking ryan is here

delicate zephyr
#

huh?

mossy vine
#

@cursive dagger no, i will just spam my alts with dms and maybe test on my bot with careful timeouts so i dont completely fuck up the ratelimits

cursive dagger
#

Yea

bleak vortex
#

Im gonna try to add mention as a prefix option to my bot tomorrow 😄

short siren
#

Gl

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

delicate zephyr
#

thats literally been copy pasted

#

I cant help you

mossy vine
#

i dont know redis at all but trying to connect to node_modules sounds wrong to me

sage bobcat
#

One message removed from a suspended account.

cursive dagger
#

Redis is hosted as a socket

split hazel
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.

split hazel
#

redis is a server based database

shy rose
#

arnt all non file databases server based 🤔

west spoke
#

I think so

unborn shadow
#

How would I access the nick name of a user and change it? I have been looking around but I can not find anything

gusty tartan
#

Wich library ?

west spoke
#

Api endpoints always work

gusty tartan
#

Yes but I doubt he maid something custom

west spoke
#

Meh

#

I make my own calls using py aiohttp requests

gusty tartan
#

Ah oof

west spoke
#

And a few other modules

gusty tartan
#

Then get the member object (i think it's guilds/id/members)

west spoke
#

Ye

gusty tartan
#

And lemme lookup for updating it

west spoke
#

Post requests

#

I believe

gusty tartan
#

For update I think it's patch dunno

unborn shadow
#

I am useing C# if you were talking to me

gusty tartan
#

But you need to update the whole member

earnest phoenix
#

which library @unborn shadow

unborn shadow
gusty tartan
west spoke
#

I'm not the one needing help

gusty tartan
#

Oh oof

#

Me dumb

earnest phoenix
#

a SocketGuildUser contains a Nickname property, it will be null if the user doesn't have a nickname, you can modify the user's nickname by calling ModifyAsync on the user and passing it a lamba

#

you can get a SocketGuildUser by calling GetUser on a guild

#

or you can cast your context user if you know the command has been executed in a guild

#

or if it's an argument in a command you can directly define public Task MyCommand(SocketGuildUser u) => ReplyAsync(u.ToString())

west spoke
#

You assume we use that language hm

earnest phoenix
#

what

unborn shadow
#

So I have a IUser how would I get the guilduser then?

earnest phoenix
#

where did you get the IUser from

unborn shadow
#

Context.User

earnest phoenix
#

you can cast it

#

to a SocketGuildUser

#

though i would suggest pattern matching to ensure the user is indeed a socketguilduser

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

please don't

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

nadeko is a fuckcluster, don't try to learn from it's code

unborn shadow
#

SocketGuildUser.Nickname is read only

earnest phoenix
#

yeah, you can't set the prop directly

#

you need to call ModifyAsync on the user

unborn shadow
#

that would be .ModifyAsync? right

earnest phoenix
#

yup

#

keep in mind when modifying the user, the bot can't modify the server owner or anyone above it in the role hierarchy

unborn shadow
#

ok

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

in which library

sage bobcat
#

One message removed from a suspended account.

unborn shadow
earnest phoenix
#

what's your code

unborn shadow
#

await ((SocketGuildUser)Context.User).ModifyAsync(Nickname("hi"));

earnest phoenix
#

ModifyAsync takes a lambda expression

unborn shadow
#

How would I do that I have never touched lambdas

earnest phoenix
#

@sage bobcat because value is not a function

#

just remove ()

unborn shadow
#

so like this .ModifyAsync(() => Nickname("hi"));

#

no that cannot be right there is a error

earnest phoenix
#

still not it, keep reading the doc

#

close, though

sage bobcat
#

One message removed from a suspended account.

unborn shadow
#

there we go .ModifyAsync((SocketGuildUser) => Nickname("hi"));

earnest phoenix
#

no, you shouldn't skim read the doc

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.

earnest phoenix
#

weird

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

split hazel
#

what is value supposed to be

earnest phoenix
#

^

sage bobcat
#

One message removed from a suspended account.

split hazel
#

value isn't predefined, show us some code

earnest phoenix
#

just define value like that

#

let value;

split hazel
#

=

earnest phoenix
#

no needed

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

and what is value??

sage bobcat
#

One message removed from a suspended account.

split hazel
#

you dont have a command parser

sage bobcat
#

One message removed from a suspended account.

split hazel
#

oh right its a handler

#

that doesnt look like a very good handler

#

theres no need to add an if statement if you already have a handler directing to the command file

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

topaz fjord
#

I would suggest rewriting a handler

#

there are some good tuts on yt

split hazel
earnest phoenix
#

b

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.

ember atlas
#

Where would I go about finding things for an info command such as server count, etc via djs docs?

pale marsh
#

They are mostly properties of the Client object in most libraries

#

Or methods in the same object

#

You should start there

unborn shadow
#

So after reading up on lambdas and then fixing the stack overflow it caused I am back to square one. I still cannot edit a nickname....

earnest phoenix
#

does the code compile now?

unborn shadow
#

The lambda was a rabit hole with out a use it just called it's self

#

so it compiled in to a stackoverflow

#

Does anyone know how to edit a nickname in C#? Or direct me towards info that could do it?

late hill
#

I disabled these ws events in Eris and one of those is apparently necessary to receive avatar updates

#

Logic would say those would go through USER_UPDATE

#

But guess not

#

I've also checked through some of eris source code

#

And still have no idea which of those would cause the avatars not to update

#

ok

#

I found out

#

Just after posting

#

That's pretty epic

#

PRESENCE_UPDATE

#

yes

#

Guess I'm retarded

drowsy sentinel
#

@tight zealot So you changed discord.client() to discord.Client()?

tight zealot
#

I changed discord to

#

Too

drowsy sentinel
#

Let me see

tight zealot
#

See what

drowsy sentinel
#

Snap a pic of it again.

tight zealot
#

I took the token off

#

So it full pic of my screen

drowsy sentinel
#

Silly goose, you identified the constant as discord, and called Discord. Change it back.

mossy vine
#
  1. you didnt save your file
  2. you are defining it as discord and using Discord
drowsy sentinel
#

If you wish to advance further, I recommend checking out the javascript course on Codecademy and reading the discord.js documentation.

tight zealot
#

Okay

mossy vine
#

and also formatting your code properly

#

you have a powerful code editor, use it to its fullest

nocturne hazel
#

Anybody know how you can detect input after a command is run?

#

e.g

#
message.channel.send("Please enter something");
//Then the user enters "Hi"
if(input !== hi) return;
//Input would be what they just sent
cursive dagger
#

Read the docs

nocturne hazel
#

...

twilit rapids
#

You can create a message collector

nocturne hazel
#

maybe creating a message event inside a command

late hill
#

Don't do that

twilit rapids
#

NO

#

Use a message Collector

#

Creating an event inside an event is going to mess things up

nocturne hazel
#

ok ty

#

Would this work for the collector:

#
let collector = new Discord.MessageCollector(channel, filter, options)
.filter('test')
.stop();
twilit rapids
#

Define channel, define the filter before you start the collector, .filter() is nothing. If you call .stop() directly it will do nothing, and you don't use the events so whenever a user sends a message it won't do anyting.

cunning oxide
#

So quick question for those of you using Discord.js. I'm struggling with something I don't think I should be. For my exec command, the bot sends an embed saying its running, and then posts another embed when the command has run with the output. I'm using message.delete() to delete the embed, but all it's doing is deleting the command message, not the first embed. A small bit of my code ```js

const RunningEmbed = new Discord.RichEmbed()
.setDescription(Running command \${code.replace('', '\')}``)
.setAuthor(message.author.tag, message.author.avatarURL)
.setColor("#34363B");

message.channel.sendEmbed(RunningEmbed).then(message.delete(5000)); // eslint-disable-line no-useless-escape

exec(`${code}`, { timeout: 15000 }, (error, stdout) => {
    var response = (error || stdout); // eslint-disable-line no-extra-parens

    if (error) {
        if (error.message.length > 150) {
            message.channel.send(`${error.message}\n\n${Date.now() - time}ms`, { code: 'xl', split: true }).catch(console.error);
        } else {
            var evalEmbed = new Discord.RichEmbed()
                    .setColor('#e84118')
                    .setAuthor(message.author.tag, message.author.avatarURL)
                    .addField("Input", `\`\`\`xl\n${code}\`\`\``)
                    .addField("Output",`\`\`\`xl\n${error.message}\`\`\``)
                    .setFooter(`Error in supplied exec.`);
            console.error(error);
            return message.channel.send({ embed: evalEmbed }).catch(console.error);
        }
    }
#

TY for any help 😃

twilit rapids
#

message is defined as the message from the user who ran the command

#

There for message.delete() will delete the user's message

cunning oxide
#

I understand.

#

so client.message.delete?

#

idk

twilit rapids
#

You can change this .then(message.delete(5000)); to .then(m => m.delete(5000));

#

So it will delete the message it send

cunning oxide
#

ah

twilit rapids
#

client.message.delete() is nothing

cunning oxide
#

yah

#

TYVM 😃

twilit rapids
#

No problem! blobthumbsup

terse pier
#

Could you please help me with installing npm on Ubuntu?

mossy vine
#

sudo apt install npm

terse pier
#

Yes but then it greets me with this error when I try to install anything

groowy@asus ~/g/Incursio-Bot> npm install npm -g
npm ERR! Linux 4.15.0-52-generic
npm ERR! argv "/home/groowy/.nvm/versions/node/v12.4.0/bin/node" "/usr/bin/npm" "install" "npm" "-g"
npm ERR! node v12.4.0
npm ERR! npm  v3.5.2
npm ERR! code MODULE_NOT_FOUND

npm ERR! Cannot find module 'ansi'
npm ERR! Require stack:
npm ERR! - /usr/share/npm/lib/ls.js
npm ERR! - /usr/share/npm/lib/install.js
npm ERR! - /usr/share/npm/lib/npm.js
npm ERR! - /usr/share/npm/bin/npm-cli.js
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
stoic parrot
#

it's already on the latest version so you don't need to update it

#

can you install any other packages?

terse pier
#

no

stoic parrot
#

weird

#

maybe try reporting it as a bug

mossy vine
#

well npm is installed

#

wait why are you trying to install npm with npm Thonk i think im missing something

terse pier
stoic parrot
#

that's how you update npm yeah

terse pier
#

@mossy vine I'm just trying to solve the "unsolveable bug" 😄

#

I can give you example for this bug on any package you want 🤷

mossy vine
#

this seems to be a possible solution?

tight zealot
#

What does that mean

terse pier
#

Why would reinstalling work?

#

It doesn't make any sense

tight zealot
#

I meant this

mossy vine
#

@tight zealot the issue is obvious, you have unclosed statements. please learn javascript properly before making a bot

tight zealot
#

Oh okay

sinful lotus
#

tbh a message collector is creating an event inside an event

#

except they clean it properly

#

and with a neat function to filter messages

cunning oxide
#

Cyber 😃

mossy vine
#

yes?

cunning oxide
#

i liked ur comment

nocturne hazel
#

Ok am I doing something wrong with the .setImage method for rich embeds? Because I am trying to send this image and I get this huge error

drowsy sentinel
#

.setImage() takes a parameter url which is a type of string.

#

So, whatever you're passing as url must be invalid.

#

@nocturne hazel ^

nocturne hazel
drowsy sentinel
#

isn't it supposed to be const attachment = new MessageAttachment

lofty bane
#

guys

#

what is this error
when i try to link heroku with github

nocturne hazel
#

i don't think so :/

lofty bane
#

Oh i fixed it

nocturne hazel
#

but Duane_, would I have to change it to attachment.png or something?

drowsy sentinel
#

Oh.. I see what you're doing. You're following that one particular guide.

#

I think it's because there's no actual direct path to 'welcome-image.png'

nocturne hazel
#

yeah

#

i'm new to canvas xd

drowsy sentinel
#

See, it'll work if you do channel.send('message', attachment). However, since you're using embed. You're gonna need a direct path to that image.

nocturne hazel
#

ah ok

drowsy sentinel
#

It's honestly easier just to send the message with an attachment rather than trying to save and load it into setImage().

nocturne hazel
#

Alright

drowsy sentinel
#

Good luck 👍

nocturne hazel
#

ty

earnest phoenix
#

yt

trail dagger
modest pendant
trail dagger
#

you should know

modest pendant
#

I tryying,

#

trying

trail dagger
#

your bot page?

modest pendant
#

you need the link?

trail dagger
#

idk what ur bot is named

#

idk how nothing looks like

modest pendant
#

i still fixing It<

trail dagger
#

did you set a donation link?

modest pendant
#

No.

trail dagger
#

looks like a bug

modest pendant
#

you see?

trail dagger
#

ye i see

#

think it is a bug

modest pendant
#

so how i going to delete that now..

trail dagger
#

dont know if you can

#

@modern sable can you check it out and see if it is a bug or not?

modern sable
#

not a bug

#

that button is always there iirc

#

it's just disabled if the owner didnt set it up

trail dagger
#

no way to remove it?

modern sable
#

you should be able to with CSS

modest pendant
#

I know But i don't know what should i type i trying and testing but is only deleting all the button i new at (Css)

trail dagger
#
                                    cursor: not-allowed !important;
                                    background-color: #A9A9A9 !important;
                                    color: #D3D3D3 !important;
                                }```
modest pendant
#

@trail dagger Wow I Forgot About that. Damn.

trail dagger
#

😃

#
    async def on_message_edit(self, before, after):
      data = getjson()
      for x in data:
        if int(x) == before.guild.id:
          if data[x]['ChannelId']:
            channel = self.bot.get_channel(data[x]['ChannelId'])
            embed = discord.Embed(color=0xff8080)
            embed.add_field(name='Message Edited', value=f'Member: {before.author}\nBefore: {before.content}\nAfter: {after.content}\nMessage Channel: {before.content.channel.mention}\n\n[Click here to jump to message](https://discordapp.com/channels/{guild.id}/{before.content.id}/{before.content.id})')
            await channel.send(embed=embed)``` str has no attritube 'channel'
#

like i hate events

#

cant add ctx without screwing up

#

and forgot how to define guild and ctx lol

#

i need to write stuff down

earnest phoenix
#

well yes, use common sense

cunning oxide
#

Did someone say self.bot????

#

LMAO

earnest phoenix
#

what

cunning oxide
#

I’m just making a joke

#

About the code

earnest phoenix
#

you're getting the content of the message (which is a string) and then attempting to get a channel out of a string @trail dagger

nocturne hazel
#

Does anyone know how to add custom fonts with node-canvas?

lethal sun
#

So, if I have a JSON:

{
    "key": ["value1", "value2"]
}```

How do I get `value1` and `value2` in Node.js?
earnest phoenix
#

key is an array in this case, so you treat it like an array

lethal sun
#

Yeah, how do I exactly get those two values?

earnest phoenix
#

like you would with any other array

modest pendant
lethal sun
#

Object.keys(json)[0] gets me key.

earnest phoenix
#

well yes

#

and key is an array

lethal sun
#

yeah.

#

now, if I put that in a variable

#

and then do json.variable

#

would that work?

earnest phoenix
#

probably not

#

it would think it's an object, when it's not

#

however, since it's an array, json[0] probably would

trail dagger
#

@earnest phoenix what do you suggest i change?

#

because i know what i did but doesnt remember how to fix

lethal sun
#
{
    "iron_axe": [ '1' ]
}```
#

obj is that json

#

so, obj[0] should work

#

but doesent

#

@earnest phoenix

earnest phoenix
#

obj[0][0]

lethal sun
#

oh yeah, so the first value of the first key

#

TypeError: Cannot read property '0' of undefined� @earnest phoenix

earnest phoenix
#

code?

lethal sun
#
var invitemcount = obj[0][0]

console.log(invitemcount);```
earnest phoenix
#

can you also provide the code for obj

cursive dagger
#

That's not how json works...

#

Please learn basic js objects first

cunning oxide
#

🤦 cmonbruh

stoic parrot
#

you have an object with a variable called iron_axe, so to access it you need to use obj["iron_axe"]

humble gyro
#

gross the color on those tags

lethal sun
#

nvm @earnest phoenix

#

figured out the solution

earnest phoenix
#

imagine using discord's graphics and not crediting them

stray pasture
#

@earnest phoenix Me!

lethal sun
#
var item = Object.keys(inv)
var amnt = Object.keys(inv)
var amount = inv[amnt[0]]``` @earnest phoenix
#

that worked

stray pasture
#

Apply to have my bot there?

earnest phoenix
#

it's cancer

#

you don't have to make everything flashy

stray pasture
#

So where?

#

Mk, applyinh.

#

Applying*

#

Done, Just waiting for approval 😉

#

😃 *

earnest phoenix
#

@earnest phoenix you realize you are advertising another bot list on here, presuming that site is yours, you're using discord's graphics without their permission (which you can get sued for), and the site is a shallow copy of DBL

#

you also mispelled view

stray pasture
#

Wait

#

Its not DBL.

#

.

earnest phoenix
#

wat

#

you're literally using discord's nitro boost graphics

#

which again, you don't have permission for and you can get sued and fined for it

#

copyright infringement fines can go from $200 to $150,000

#

how are iframes relevant to using discord's graphics

#

and that is relevant to using discord's graphics how...?

#

you can get sued, or if you're underage, your parents/guardian can

#

wat

#

what you're doing is literal copyright infringement, it's not a joke and it shouldn't be joked around with, it's serious business and fines are very expensive

#

discord's tos itself says you aren't allowed to use their service materials (graphics) and download them

#

you have it downloaded and literally referenced locally

#

it doesn't matter if the website is made for business or not, you're not allowed to use their materials

unique nimbus
#

If you don't have permission from the company itself it is stealing

earnest phoenix
#

no, you have a billion results on google about how copyright works

cedar nova
#

please teach me to create a playing status script for my bot guy

hushed quarry
#

uh, you can definitely link to external images hosted on discord

#

that is not copyright infringement

cedar nova
#

so that my bot can have playing status guys

hushed quarry
#

you just can't download them locally and put them on your server and use those

earnest phoenix
#

which they did

cunning oxide
#

@cedar nova nobody here is going to spoon feed you. Please understand how your desired language works before asking people to write code for you.

#

@earnest phoenix @earnest phoenix sorry for tag — please speak about this in another channel.

earnest phoenix
#

the conversation stopped like 5 minutes ago lol

cunning oxide
#

Oh shit sry

#

My time stamps weren’t showing

cedar nova
#

@cunning oxide ok sorry

errant galleon
pallid zinc
#

Where I can host a website for free

grim aspen
#

glitch maybe

earnest phoenix
#

tip: dont

#

get a vps where you'll be able to control routing, ports and your ssl certs

real garden
#

4

grim aspen
#

do you need help or are you just posting random numbers because i saw you posted "5" in #general too @real garden