#development
1 messages · Page 1262 of 1
Use python
no
nobody asked for that input

How could I get the id of the person who invited a bot to a server?
I think there's an audit log for when the bot is added to a server
query the audit logs
good idea
should i hold this
client.on('debug')
why are you logging to discord in the first place
why not ?
that's such a horrible idea
why
Ratelimits one main reason
discord downtimes, you're contributing to the 50/1 global ratelimit, insecure
yes
i turned off
@earnest phoenix so what is ur idea
for logging errors ?
It's not hard to store such stuff locally, is it
you can use a webhook or even make a command that dumps your logs into a text file
and then upload that
use a webhook?
@misty sigil ._.
oh
i use only webhooks
How do I take the same two bodies?
ex: res[0].tier res[1].tier
[
{
"leagueId": "0bf51832-f12a-475d-9759-9848566a6982",
"queueType": "RANKED_SOLO_5x5",
"tier": "PLATINUM",
"rank": "II",
"summonerId": "ug1XDV8d5Bh4M6CmTiQVfvT7Gi4953SOnDrnKpKByaq9ouo",
"summonerName": "aproxthethat",
"leaguePoints": 54,
"wins": 178,
"losses": 147,
"veteran": false,
"inactive": false,
"freshBlood": false,
"hotStreak": false
},
{
"leagueId": "19fc1cca-a60f-44e5-9e3d-72618663226d",
"queueType": "RANKED_FLEX_SR",
"tier": "PLATINUM",
"rank": "II",
"summonerId": "ug1XDV8d5Bh4M6CmTiQVfvT7Gi4953SOnDrnKpKByaq9ouo",
"summonerName": "aproxthethat",
"leaguePoints": 95,
"wins": 88,
"losses": 74,
"veteran": false,
"inactive": false,
"freshBlood": false,
"hotStreak": true
}
]
please
bin that
you're cluttering the chat
xD
-dotpost
:))
although there's still the issue of discord downtimes, look into sentry @earnest phoenix
How can I get the ID of a guild the bot was just added to? (discord.js) (guildCreate event)
guildCreate event returns a full guild object
so guild.id?
i feel like if you were to read the docs
you'd know that
module.exports = (client, guild) => {
console.log(guild.id)
}
if u use event handlers
if not
client.on("guildCreate", guild) {
console.log(guild.id)
}
@earnest phoenix for-loop, each iteration you'd get result[i] where i is the loop parameter
@earnest phoenix js res.map(response => response.tier);
For loops are hardly needed in this case at all
So how do I sort it one under the other?
What???
Eh, right, map
What???
@earnest phoenix${res1.map(res1 => res1.leaguePoints + ' LP / ' + res1.tier + ' ' + res1.rank)}I want rank 1 on top and rank2 bottom
one under the other
54 LP / Diamond II
19 LP / Platinum III
ex
So what are the ranks based on? res1.rank?
[text](url "additional hover text")
There are 2 ranks in the json file I have thrown.
bottom different rank top different rank bottom different rank
I tried it on title, i tried it on field title
setURL()
OJ YEHA
Are you drunk or just confused
Are you drunk or just confused
@slender thistle i think both
why the fuck can i not iterate thru an exported object?
@earnest phoenix js res1.sort((a, b) => b.rank - a.rank).map((o, c) => `${c + 1}- ${o.leaguePoints} LP / ${o.tier} ${o.rank}`).join("\n");
@cobalt spruce #memes-and-media please
wow thanks for the nitro
@earnest phoenix I used .join ('\n') ok
@umbral zealot sorry man
AAAAAAAAAH
@opal plank g is an object not a string, maybe that's your problem
wrong
oh waiiiiit a minute
its has its own type declaration
I always get confused between let x of thing and let x in thing too
one is the index, the other is the value
nah this case is right
in is for properties
of in iterable
object.values() is iteratable
but it pulls gauges from the import
not the individual gauges
not even import works
FUCK
got it
Holy fucking shit this was annoying
This is why i said TS is confusing asf
Not really, yes, but sometimes you ran into these type of error which just keeps you, looking at the code for 5 hours
How do I get text that is only in the first "" from a json file?
ex: "10.19.1"
["10.19.1","10.18.1","10.16.1"]
yeah
How can I check if *member has a role?
How can I check if *member has a role?
member.roles
like '${guild.name}' ?
yes
it doesnt work xd
member.roles.has ?
${message.guild.name} if on command
again, not everything is on message
wait i need to try
it can be channe.guild.name
if on command
or guild.name
as message
or client.guilds.cache.get().name
${message.guild.name} doesnt work in embed
its not on message
its <guild>
<guild> can be accessed from plenty of places
not only from message @rancid bramble
what?
bruh
in YOUR file
exports.run = (client, message, args) => {
const user = message.mentions.users.first() || message.author;
const Discord = require("discord.js");
const messageEmbed = new Discord.MessageEmbed()
.setColor(message.member.displayHexColor)
.setFooter('Komut ' + user.username + ' tarafından istendi.')
.addFields(
{ name: ' Sunucu Adı', value: '${guildPreview.name}' },
{ name: 'd!yaz', value: ' **DisTR yaz** yetkisi olanlar bu komutu kullanabilir.' },
)
message.channel.send(messageEmbed);
}
yes
Not a very good idea
.roles what?
member.roles.find ?
i sent you the documentation
thanks i will read this in my free time
How can I get only the first 3 values in the array?
array[0] array[1] array[2]?
[{
"championId": 86,
"championLevel": 7,
"championPoints": 200355,
"lastPlayTime": 1599514695000,
"championPointsSinceLastLevel": 178755,
"championPointsUntilNextLevel": 0,
"chestGranted": true,
"tokensEarned": 0,
"summonerId": "ug1XDV8d5Bh4M6CmTiQVfvT7Gi4953SOnDrnKpKByaq9ouo"
}]
there are too many such lines
i just want to get top 3 championID
if(collection.count_documents(f'{guild_id2}' and 'Levels') == 0):```
is this even a thing?
i just want to get top 3 championID
@earnest phoenix for loop until index of 3, or select directly with what Matthew said
how with mongo db can i look for 2 things
like this
if(collection.count_documents(f'{guild_id2}' and 'Mod') == 0):```
so like the guild id
and the module
What the fuck
I have eval command on my bot
discord.js
what is the eval for sending a message in a certain channel
;eval client.channels.get("756508475118452797")channel.send("a")
doesnt work

also you don't need to have channel there, it will throw errors at that as well
^^
we are the prefect team 
nice
TypeError: client.channels.cache is not a function
what version are you using?
wtf you trying to do
he likely did cache()
12.3.1
||time to throw the docs at them?||
i did ;eval client.channels.cache("756508475118452797").send("a")
||correct||
||very||
^^^^
bruh im hella proud of this
mhm
NO COMMAS REEEE
i see red. that usually means bad
650k messages, 187k users, 1156 cached streams, and ONLY 228Mb ram
lol
so basically get all the thingies with the same guild id
then look for one that says mod?
in mongo
Yout
I uj
I'm at loss of words
And let me explain why
Don't you think I told you at some point that you are supposed to use dictionaries instead of passing shit like strings
Is there a way to access info about the games people are playing? I was wondering if I could make my bot auto mute people for among us. Or move them to another vc when they die.
My lib: 1000+ channels for 200mb
D.js:
Well I can't find anyone who has done this by getting data from the game through discord so I dont think it's possible which is unfortunate
its not cuz it hasnt been done before that its not possible
i'd recommend you try it yourself and see what kind of roadblocks you find yourself in
@burnt sinew
¯_(ツ)_/¯
Aight, time to attach users cache to channels
Done did it
Got my bot some code but they won’t let it in so I’m just sitting here
@placid iron hey
i saw ur rank cards and they look AMAZING
wondering how you do them and if you can help me a bit?
do you use python?
yes
@drifting wedge
const botDocument = await findOne({ guild_idL 'guildIDHere' })
botDocument.plugins.hello_world = true
await botDocument.save()
@sacred cypress
imagine writing object properties with spaces or hyphens
so basically: i use Pillow and first of all i get the users pfp and turn it into a circle. next i create a base plate for all the stuff to go on and if they want to i add that extra background rectangle (i use rounded rectangles which i found on stack overflow) then i write the levels and rank text in the top right. i get the size the text would be so that i can account for different length levels then i move the other text to the right by that ammount and so on. Then i do the same for the xp text (99 xp / 1k xp). then i write the name and discrim. This is different, i have the discrim as a constant text size and i change the text size of the name so that it gets smaller if it needs to. This is also done by finding the text width and then reducing the size then retrying it to see if it will work. you have to use this itterative solution because text size isnt directly proportional to width. Then i just draw them like everything else. After that you can just plop on the pfp with a black border and put that all on a image if you want then send it
yep
this is mine currently
but im looking to add more backgrounds, and a rank thing
and the discrim
i chunked it down into small enough parts where i think you could stack overflow it
ah
bacground is easy, just have it so that the image is the opened bg compared to a solid colour
so i made a bot in discord bot designer using the default script, how do I add a currency system?
so i made a bot in discord bot designer using the default script, how do I add a currency system?
@earnest phoenix u have to make ur own
add custom commands, dbs
stuff ig
Ngl, you should do ACTUAL coding rather than using bot makers @earnest phoenix
yeah i'd love to but i'm working off a chromebook and a phone so...
saving up for that windows machine
@earnest phoenix you can code using a piece of paper
Ehh, a chromebook can run a few IDEs
you just need to put it in a powershell and run it
but u can code using anything
then just put it in something that runs it
ok what would you suggest
use the chromebook
and try using ides
IDE*s
like atom but im not sure itll run
try something low memory
would any text editing program work or does it need to be able to run js in-app
well 1. u want to do js?
nothing against it
\just wanna know
i think you can do like notepad++ but not 100%
Any text editor works but it's suggested to use a proper IDE
node.js might be supported on chromebooks
ok i'll check
Temporary break
i'm using bdscript rn so converting to js will be fun
good to hear my human google didnt quit
you dont have to tho
maybe try using the code u have
like frm the bot designer app
see if u can get into its files
and just use that code
@green kestrel before #announcements kicks in. Can you re-invite https://top.gg/bot/697813566731845632 to the server? It was kicked bc it was using to much CPU but I’ve upgraded the VPs so it’s good now
it already did?
if i can get into the files is no question at all, the potential problem is finding a new hosting service
I don’t think it did
Yeah
shiv taking a break?
Yeah
@slender thistle yes he left of yes it will be kicked
Why was he banned?
Yep!
Why not go like mod_toggled or levels_toggled
Why data["Mod Toggled?"]
data["mod_toggle"]
but i just dont see why
modToggle
More readable and easier to comprehend codewise
"Generally Spaces In Keys Should Be Avoided": "And Yes, Underscore Will Work"
I have message_id key storing an Int64 value with no problem
Still asking myself why it's not a string but eh
can any of you guys rate my website, I just did a pretty neaty update, it's not finished yet but I'm looking for some feedback
@ancient nova ig so
i mean send screensshots?
i dont feel comfortable clicking links
that's alright, I have quite a few pages though so it'd be hard screenshot each of them
also interactive elemnts dont work in scrnsht
well i mean just send the link ig
sure
but im kinda freaky with like links and all
screenshot or screenshare ig
but i just dont feel comfortable w links
I'm editing the website on my pc
can i be honest?
sorry for the off centered texts
ooh glitch
alright
and the white text
sounds like your convincing your mom to get you a ps5
try to say like: the best bot ever!
or something
but it looks good ig
thanks
np
I spend few days making it
though by screenshots you're not gonna see everything, I've added few animations
too
i just wrote an extra 200 lines of code i didnt need B(
ooh glitch
@silver lintel I'm buying a custom domain soon
id recommend him if u wont have the users do any private stuff
like passwords etc
and he gives a free domain
its a subdomain
of .eukserver.com
not sure why everyone has a problem of making websites on glitch, glitch is a good hosting service, very customisable and free
heroku's good too
heroku's good for bot hosting if you don't have any money to buy a vps
arg is None
I centered the texts and I'm gonna now finish writing the FAQ and ToS for the web, and the bot
@opal plank How do you do stress testing?
lmao
i have a set list of channels my bot joins to stress test my cache
Ah, gotcha
how would i do a message collector in discord.js and see how long the user took to repsond?
Lol I finally got my webserver up today for my website
and then the moment the user answers you send the difference in time
wydm how to make it count?
const start = d.now()
collector.start()
collector.on(collect => meessage.reply((d.now() - start))
ok
what the heck did u just say
Who~
variable.createdTimestamp - message.createdTimestamp?
you should REALLY look at js basics before doing a bot dood
i prefer Ts
can someone send me the link to all of discrord's rate limits
im wasting my time to make commands but dont work properly cuz of rate limits
Even my webserver is flask
const start = d.now()
collector.start()
collector.on(collect => meessage.reply((d.now() - start))
@opal plank how to get the date?
is that d?
@silver lintel learn js
const date = new Date()
Twitch
Lol
Discord
Dashboard/website
I need help with my website
Youtube
*dashboard
theres a 5th repo but that one i deprecated
lol
can someone send me the link to all of discrord's rate limits
yeah those are all repos for Leviathan
I see
Leviathan isnt a bot technically
Its multiple bots/processes talking to eachother
GUILDS (1 << 0)
- GUILD_CREATE
- GUILD_UPDATE
- GUILD_DELETE
- GUILD_ROLE_CREATE
- GUILD_ROLE_UPDATE
- GUILD_ROLE_DELETE
- CHANNEL_CREATE
- CHANNEL_UPDATE
- CHANNEL_DELETE
- CHANNEL_PINS_UPDATE
GUILD_MEMBERS (1 << 1)
- GUILD_MEMBER_ADD
- GUILD_MEMBER_UPDATE
- GUILD_MEMBER_REMOVE
GUILD_BANS (1 << 2)
- GUILD_BAN_ADD
- GUILD_BAN_REMOVE
GUILD_EMOJIS (1 << 3)
- GUILD_EMOJIS_UPDATE
GUILD_INTEGRATIONS (1 << 4)
- GUILD_INTEGRATIONS_UPDATE
GUILD_WEBHOOKS (1 << 5)
- WEBHOOKS_UPDATE
GUILD_INVITES (1 << 6)
- INVITE_CREATE
- INVITE_DELETE
GUILD_VOICE_STATES (1 << 7)
- VOICE_STATE_UPDATE
GUILD_PRESENCES (1 << 8)
- PRESENCE_UPDATE
GUILD_MESSAGES (1 << 9)
- MESSAGE_CREATE
- MESSAGE_UPDATE
- MESSAGE_DELETE
- MESSAGE_DELETE_BULK
GUILD_MESSAGE_REACTIONS (1 << 10)
- MESSAGE_REACTION_ADD
- MESSAGE_REACTION_REMOVE
- MESSAGE_REACTION_REMOVE_ALL
- MESSAGE_REACTION_REMOVE_EMOJI
GUILD_MESSAGE_TYPING (1 << 11)
- TYPING_START
DIRECT_MESSAGES (1 << 12)
- CHANNEL_CREATE
- MESSAGE_CREATE
- MESSAGE_UPDATE
- MESSAGE_DELETE
- CHANNEL_PINS_UPDATE
DIRECT_MESSAGE_REACTIONS (1 << 13)
- MESSAGE_REACTION_ADD
- MESSAGE_REACTION_REMOVE
- MESSAGE_REACTION_REMOVE_ALL
- MESSAGE_REACTION_REMOVE_EMOJI
DIRECT_MESSAGE_TYPING (1 << 14)
- TYPING_START
```How do I read this thing???
Getting a tad outdated
I see
php has been providing some better shit
Im using flask for python
also found some other good things
Php is meh
What
GUILDS (1 << 0) - GUILD_CREATE - GUILD_UPDATE - GUILD_DELETE - GUILD_ROLE_CREATE - GUILD_ROLE_UPDATE - GUILD_ROLE_DELETE - CHANNEL_CREATE - CHANNEL_UPDATE - CHANNEL_DELETE - CHANNEL_PINS_UPDATE GUILD_MEMBERS (1 << 1) - GUILD_MEMBER_ADD - GUILD_MEMBER_UPDATE - GUILD_MEMBER_REMOVE GUILD_BANS (1 << 2) - GUILD_BAN_ADD - GUILD_BAN_REMOVE GUILD_EMOJIS (1 << 3) - GUILD_EMOJIS_UPDATE GUILD_INTEGRATIONS (1 << 4) - GUILD_INTEGRATIONS_UPDATE GUILD_WEBHOOKS (1 << 5) - WEBHOOKS_UPDATE GUILD_INVITES (1 << 6) - INVITE_CREATE - INVITE_DELETE GUILD_VOICE_STATES (1 << 7) - VOICE_STATE_UPDATE GUILD_PRESENCES (1 << 8) - PRESENCE_UPDATE GUILD_MESSAGES (1 << 9) - MESSAGE_CREATE - MESSAGE_UPDATE - MESSAGE_DELETE - MESSAGE_DELETE_BULK GUILD_MESSAGE_REACTIONS (1 << 10) - MESSAGE_REACTION_ADD - MESSAGE_REACTION_REMOVE - MESSAGE_REACTION_REMOVE_ALL - MESSAGE_REACTION_REMOVE_EMOJI GUILD_MESSAGE_TYPING (1 << 11) - TYPING_START DIRECT_MESSAGES (1 << 12) - CHANNEL_CREATE - MESSAGE_CREATE - MESSAGE_UPDATE - MESSAGE_DELETE - CHANNEL_PINS_UPDATE DIRECT_MESSAGE_REACTIONS (1 << 13) - MESSAGE_REACTION_ADD - MESSAGE_REACTION_REMOVE - MESSAGE_REACTION_REMOVE_ALL - MESSAGE_REACTION_REMOVE_EMOJI DIRECT_MESSAGE_TYPING (1 << 14) - TYPING_START ```How do I read this thing???
Don't expect us to go out of your way while we are in the middle of a conversation
Wait until we are done
ok
except for the leviathan most of the commits were girthy
Yea I'm just making my login / panel
im implementing my cache rn, i stopped the dashboard till i get more things out
i might need to go my route to lower the ram a bit
i sense one or two memory leaks in here
610Mb currently
thats almost double of what it was before when i tested
though to be fair im caching the messages on this go too
can i ....?
holdup
oh yeah i sure can
cache size without messages
i like that too
I hope my bot gets big lol
what types of Coding websites do u guys use to code bots i need help
We dont use coding websites
we code the bots ourselves
and use the documentation for the tools/libs we use
Lmao
ok so i can use yt to find out
How old are you
bad
14
youtube isnt good for learning
but i dont code
im a gamer not a coder
making bots is coding
ik do u use java or something
Like me

lucky
Whats going on here
someone claiming to have LEARNED js in less than a week
should i start with minecraft then roblox then this because minecraft is easiest coding app ik

someone claiming to have LEARNED js in less than a week
@opal plankI can't code everything in discord.js but I learned how to do the basics in that amount of time
Dm me then
minecraft is easiest coding app ik
u wot m8? Minecraft is a coding app?
@nimble kiln I code discord bots in html, what you on about?
-_-
@opal plank no i code bots in css
@nimble kiln I code discord bots in html, what you on about?
@opal plank duh, I obviously use PHP to code my discord bots..
@nimble kiln I use CSS
AYYYYY lolritter
@dense nest Hi dere
Can I use js on a python thing?
Wdym
Like run js?
No
i dont think so
yes and no
-_-
Yes and no?
you could hook something like an api
as long as both languages have a middle ground like JSON to talk between eachopther
i guess it would be doable
ima connect minecraft to roblox coding
both have await so they could talk to eachother
you'd have setup an api like thing though
Why?
@primal mulch I feel like your a troll
ima connect minecraft to roblox coding
^ trolling at its finest
But like if I have 2 instances
no im legit 14 u can dm the discord team they have power to see people's age
And they’re separate
no im legit 14 u can dm the discord team they have power to see people's age
@primal mulch they won’t tell u
if you plan to make they work together, then no
Yea
you'd need a middleware
oof unless u work there
And @primal mulch you can lie of your age
no

I tell the same age
But the isssue is with heroku
Oki im just blocking
wont matter which lang you would be running the different instances since they'd be all talking to eachother in JSON format
I can’t run both
why not make a new acc?
Ehh I got my oldest discord acc deleted so idc
ok srry ima sleep

And import the js files to bot
why do you even want 2 bots?
And py to client
why do you even want 2 bots?
@opal plank not 2 bots
1 bot
With 2 Lang’s
then what you doing that requires two processes that cant be done in one?
It’ll just make it easier for me
just for fun?
For tutorials etc
like i said, the only way you can comunicate between 2 different languages would ba an API like middleware
would something like
amount = 0
ws.on('message', () => {
amount++
})
get avg () {
return amount / (this.uptime / 1000)
}
get me events per second?
i guess?
you could just hook onto client though
use the listener on client rather than the websocket
Wait
though im fairly certain those are only message events
I could use like 30 Lang’s lol
they deal with their stuff in JSON
Image this
you using py
im using Ts
how are we both able to connect to discord?
its the same principle, just send JSON or some unified format that can do the middle ground for you
thats why i told you to make an API that does this for you
whenever you doing something, send the api and reroute to the app you wish
and get twice the spam
Why
gotcha
on node we have things like IPC which is for communicating between processes
Same prefix
Why do you happen to come up with the worst decisions possible
though im unaware if such options are available for py and other langs
Just use websockets 4Head
or that
Google time may help increase your lifetime
Okkk....
its kinda advanced though
dont expect to have an easy time figuring out how IPC works
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: argument of type 'NoneType' is not iterable```
@slender thistle have u dealt with caching before?
why is everyone here so smart
wuts a lib dev?
wuts a lib dev?
@drifting wedge A developer that develops a library
(aka map in js)
i thought that develops WITH a lib
wait tho i am
its called discord.pp
its discord.py
but with a DIFFERENT NAME!
0/10 would not give library dev role
wondering how can i improve cache a bit, even though i got a fine working version currently
Ehh done in Python for my bots
and with +120% stupidity
I only cached custom prefixes though
cache => channels_cache => users cache => user
they all mapped in that order
though im planning to add a global static user cache as well
Twitch has a nice API is what you mean here? 
imagine this as the difference members and users in discord
I'll take a look when I'm not busy
aight
i made my bot with botghost and bot designer for discord
Tim might also be able to gimme a couple tips on this tbf
botghost is poopoo
since he done d.j-light
and bot designer is peepee
i made my bot with botghost and bot designer for discord
oh no
ya i hate premuim
Toss him a DM ig
just code it
he might have some good ideas on how to reduce caching effectively
like its stuff isnt even good
i use bot designer to set my bots custom status for free
if 'mod' in arg:
return```
can an1 help?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: argument of type 'NoneType' is not iterable
bet
Check if arg is None first
wut?
let filter = m => m.author.id === message.author.id;
message.channel.send(firstEmbed);
message.channel
.awaitMessages(filter, { max: 1, time: 30000, errors: ["time"] })
.then(async collected => {
let userInput = collected.first().content;
pollText = userInput;
let reactFilter = (reaction, user) => user.id === message.author.id;
//var messageSent = message.channel.send(reactEmbed);
var messageSent = await message.channel.send(reactEmbed);
let reactCollector = messageSent.createReactionCollector(reactFilter, { max: 4, time: 30000, errors: ["time"]});
reactCollector.on("collect", async (reaction, user) => {
// 'reaction' is the reaction that the user reacted with
message.channel.send(reaction.emoji.name);
// 'user' is the user who reacted
}).catch(() => {
return message.channel.send("No answer for asdsdsad15 seconds. Set up has been cancelled.");
});
})
.catch(collected => {
return message.channel.send("time out");
});
the message collector and reaction collector both work perfectly by themselves, but when i put them together, when the reaction collector starts, it says time out
@silver lintel Did you try logging collected to see what it collects?
because you .catch(collected =>
o
alright I finished updating the website for today, I'll continue tommorow. does anyone have a minute to rate/tell me if anythings' wrong etc. I really need opinions and feedback
@nimble kiln it logs a big object
Collection [Map] {
'758142415235186728' => Message {
channel: TextChannel {
type: 'text',
deleted: false,
id: '753764342503309324',
name: 'general',
rawPosition: 0,
parentID: '753764342503309322',
permissionOverwrites: [Collection],
topic: null,
nsfw: false,
lastMessageID: '758142415235186728',
rateLimitPerUser: 0,
lastPinTimestamp: null,
guild: [Guild],
messages: [MessageManager],
_typing: Map {}
},
deleted: false,
id: '758142415235186728',
type: 'DEFAULT',
system: false,
content: 'hi hi',
wait its collection map
hold up
you dont even need that .catch down there
you can catch the timeout with
reactCollector.on('end', (collected, reason) => { })
oh
leveltoggle = lvltggld["Levels_Toggled"]
KeyError: 'Levels_Toggled'```
what does this mean?
oh
@silver lintel It's possible that it returns 2 arguments instead of just "reason"
Yes it does, so collector.on('end', (collected, reason) => { })
is this right for starting it?
var messageCollector = message.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ["time"] }); messageCollector.on("collect", async collected => {
@drifting wedge KeyError - key doesn't exist
Print your dictionary and see what keys it has
is this right for starting it?
@silver lintel Never used awaitMessages() before. I start my collectors like this:
const confirmation = msg.createReactionCollector(confirmFilter, { time: 120000 });
May someone help me make my bot Properly
Yours does look right tho - When I look at the docs
Never used awaitMessages() before. I start my collectors like this:
const confirmation = msg.createReactionCollector(confirmFilter, { time: 120000 });
This is also for reactions, I just realized 😄
any guide for the bot to grab an image sended by an user?
@ionic dawn attachment

Discord.js: https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=attachments (to add to hayper's comment)
thankyou @nimble kiln it works :)
Nice 👍
how to make the messageCollector.on("end", only when time has run out, because when i do the reactioncollector, it does it
any good gif manipulator or editor for nodejs?
im trying to use gif.js but I dont think is the right tool
@ionic dawn just use ffmpeg to transform gif into png
And edit it, then convert back to gif using ffmpeg
im trying to generate this 
using a user profile image and the hand animation
ffmpeg can do that? never used it
Yeah
kk, ty
You just need to get frames from the hand
Then edit one by one
Then transformm all of edited png back into gif
Ffmpeg website
can I install that 8yo node package or should I install it using the web files on the vps?
You can use ffmpeg thing that download ffmpeg and give you the file path
To run the child ptocess orsmth idk
@nimble kiln I code discord bots in html, what you on about?
@opal plank you can actually make bots with html.. just good luck if you actually are dumb enough to try to
you'd be using js
ikr
then what is markdown itself 🤔 sh ik
set a macro with hrefs that do api things without js
coding a bot with javascript vs coding a bot with nodejs
set urls with params and headers beforehand
and just macro your way into it
do heartbeats and acks based on a macro clikking 1 button in the middle of the screen
the macro provides the 'process'
you just setup a loop of href's
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/758136272719708170
if you consider command blocks coding, yes it is but if you dont consider command blocks coding because it isnt, no it isnt.roblox actually has a code editor i think
just thinking about it gives me shivers
i heard people actually made discord bots using roblox lmao

command block discord bot when?
yes someone showed me scratch for discord

/request <GET/POST/etc> <link> "<headers>" "body>" when?
but you get the gist
did any one know free hosting sites
yes but i dont wanna advertise
use glitch.com using google scripts ping
i know one free host: danbot hosting
owner told me they dont store any data so
how can i add my bot for testing
yes]
check #announcements
did any one know free hosting sites
@earnest phoenix all my homies host inside a google document
?eval message.guild.members.forEach(member => console.log(member.user.username)); no work
do you mean message.guild.members.cache
how to do messageCollector.on("end" only when its been a certain amount of time with no message
breh
Listen, learn js then learn then js discord api
i know how to console.log hello world ;)
i just came back from 2 year coding break
ik, which is wai im asking here
Youtube
Api docs
Don't waste people's time with simple questions when you can Google a fucking js wait
It's not hard at all
Search the docs then
Like seriously
@silver lintel if you're using Discord.js you can specify{ time: 3000 } in the options argument in the constructor of the messageCollector, the time is in ms. But yes, check the docs for specifics
why would this code get this error when I move it into the event folder/file but work if it's in my main bot file?```js
const member = reaction.message.guild.members.cache.find(member => member.id === user.id);
TypeError: Cannot read property 'guild' of undefined
at MessageReactionAddEvent.run (C:\wildcat\src\events\reactions\messageReactionAdd.js:12:46)```
EDIT: it's the same with reaction add/remove
Anyone who made their bot from discord.py
@earnest phoenix just ask the question, someone will come sooner or later
@fast trench message is probably not defined in your file/folder
Hello Guys, i have a quistion! I made a bot in java jda and i the methode .getGuildbyhash(hash); dont exists anymore.
@fast trench does reaction exist?
@fast trench message is probably not defined in your file/folder
@fickle sapphire It works in the main file just as is though...and message isn't defined there
Yes Dice
but it does the same thing with member events too
which is weird
I need help
awaiting? I always have done that
But i Can wait
@gusty forge just wait, I don't think anyone here knows java at the moment.
wait no I am collectiong
Ok
@fast trench show me what you do
atleast in the main file but not the new files
aH
You see
Awaiting returns a discord collection
Collectors probably do too
But to be sure, can you type in console.log(reaction)
yep doing that right now lol
hold on doing a few things first
Okidoki
ok I'm more worried about the member events so let's focus on that lol
This is my code https://srcb.in/6d5687f8bb and this is my error ```js
(node:31668) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
at MemberAddEvent.run (C:\wildcat\src\events\members\guildMemberAdd.js:22:26)
at Client.emit (events.js:215:7)
at Object.module.exports [as GUILD_MEMBER_ADD] (C:\wildcat\node_modules\discord.js\src\client\websocket\handlers\GUILD_MEMBER_ADD.js:16:14)
at WebSocketManager.handlePacket (C:\wildcat\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\wildcat\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\wildcat\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\wildcat\node_modules\discord.js\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:210:5)
at Receiver.receiverOnMessage (C:\wildcat\node_modules\discord.js\node_modules\ws\lib\websocket.js:797:20)
at Receiver.emit (events.js:210:5)
(node:31668) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)











I can't code everything in discord.js but I learned how to do the basics in that amount of time
oh no
