#development
1 messages · Page 1368 of 1
That’s not the fault of PHP it’s just NOT supposed to do so
@quartz kindle anyways ty
Im gonna write the code at the weekend and will head back to u if I still have an issue with async in this case
👍
Have a good one
bruh i swear....
OOOOH
THAT might be the culprit
wait
what
that makes no sense
erwin had an epiphany
hmmm
bruh i had streamer mode on
think that'd effect how the presences are updated?
the payload still the same, just wondering about the frequency
normally its one update per 15 seconds as ratelimit, no?
no idea
hmmmmm
if tim doesnt know, this is a lost cause
of well, deal with the bugs users
¯_(ツ)_/¯
tis a feature, not a bug*
@quartz kindle Just one idea before I go tho...
Instead of processing the message if the regex pattern matched, how about POSTING the message via axios or whatever lib to my PHP worker.
That should be async
thats the way to go if you expect you workload to be more than a single node process can handle
„Whatever lib“
alternatively you can send it to child/worker processes within node itself
thats basically how you multithread with node
slave/sleeve process
Hmm that would be new for me but probably worth a test
Anyway it would be async as mentioned, aye?
yes
for your own sanity, if you gonna cluster stuff use nodes clutering or something like kubernetes, dont go the rabbit hole i did
I mean that would reduce the work to port the code over to JS
there are so many ways to scale horizontally in node that its kinda stupid
the easiest way would be to use node's built in cluster module, because it creates child processes that can share a single port
^^
if your app relies on listening to a port that is
Yeah I got that but it would require to rewrite the whole code in JS again
Err lol I meant to port over to JS to port as port lmao
ah lmfao
if you're using something like nginx and a node reverse proxy, then you can also cluster through nginx lmao
Probably not the best English I know
Imagine handling 100 of messages each second POSTING the msg to my PHP file...
The webserver log will probably explode
xD
Damn I guess I need to rewrite the whole thing in JS
Until now I was only speaking about one node process handling one remote connection only
The goal are multiple opened connections all dealing with those incoming messages, too
Like sharding for Discord bots
Will be required I guess
oof that’s a lot of work...
any other python devs here
Imagine if mods decide to delete the development channel then you realize tim is angry, you know shit is serious
lmao
i wont be angry
i'll just spend more time being actually productive
and people will flood my server
xD
He would probably have more time to spend on porn for example (each day) lmao ... or being „productive“ hehe
Aye same idea tho
Well that’s how life actually is
I‘m driving atm and should probably watch the highway but I’m alone so I’m good to go
lmao
bots are no longer added to this server
How long do you drive each day?
FaKe: yes
Err just a few hours... 3-4 depends on the day
Everytime you're here you say "I'm driving atm"
@flat pelican
Instagram more like cringe
Lol
thanks
Wait until the messages being deleted
Discord please
Voltrex answer will get a new meaning
Lol
I banned them with "Clear messages" enabled
His messages will be deleted when cyberpunk 2077 releases

Discord pls
🔓 Unbanned Kinez#4136 (@frozen sentinel)
nope 
Rip
alright, i'll do it manually
Just run a loop with luca
Wait
kek, sorry you where the one that got tagged, shoulda tagged someone else 
does someone know why images are loading slow for me?
They all got deleted at once suddenly
Does this mean it’s a good time to start spam now? 💩
My bot sends a reddit image but it takes like 1 min to load
is that discord or reddit?
could be either
It's just your internet connection speed that is slower than the fps rate of yandere simulator
could be your connection too
hmm
kek, sorry you where the one that got tagged, shoulda tagged someone else
@solemn latch why tho, I'm fine with getting pinged for useful purposes lol, it's my job to keep the server clean
Bruh it was for the guy who was spamming, oof
xD
oh i was joking :d
Alreayd knew that ws coming
He got me with the oldest tricks in the book
can I post a reddit image to see if its loading faster here for you guys
Lemme just commit delete message
Ha gottem
Oof damn
Rip context
Wasn’t prepared for
Context goes undefined
how can i host my bot?
@covert gale with a vps
or selfhost
Change that to 0 / 1, you can go to the speed of light
Unfortunately I have mass so I can’t
i was joking when i said glitch
its against tos to use bots now on glitch.
unless you pay for the 24/7 service
which is overpriced
anyone know how to transfer mee6 levels to another bot?
that sounds like a nightmare
ive seen servers do it before
if you mean from mee6 to your bot. you could possibly do a webrequest
grab all the users
might be against mee6 tos
there is a mee6 level api though
@normal sage you can get the levels using the api but whether or not you can transfer those points to another bot depends on the bot you're trying to transfer to. Easiest way would be to transfer to your own bot.
With mee6?
Yeah making your own bot would be the only option I think
I mean I don't wanna use a different bot that has leveling stuff lol
Yeah
I wanna transfer the mee6 level data to my bot.
okay
Mee6 has a public api? @rose warren
I don't know this guy says he found one 😂 I don't know if it'll work for him
Yeah not going to lmao
Just gonna be like "send your client object through the api" 5 seconds later your token gets yoinked and bye bye servers
yeah it does
Link it to me
so basically it isn't very useful
for what he asked for, it feels useful
It is for what he's doing
He wants to dump his server's mee6 levels to his own bot leveling system
if you have a medium sized server but want some features custom, but want to recognize peoples already used activity it seems super useful. which ive seen happen a few times, just didnt know mee6 had an api
A free api 😂
you're up early willichan
I mean, I dont see the point of that, and if mee6 is already present on the server, there isn't a need to have another levelling system based off it
wrong channel
custom features?
He wants to ditch mee6 i think
yeah
well you could give additional rewards
But keep levels
yeah you could sorta like migrate
That's what his question was
Best option is just allow them to !redeem at a certain amount of xp and get rewards in the server
I see
that would be kind of cool
uhh well its what they wanted so
how do i get someone's pfp as a dif file format than webp in dpy?
He wants to ditch mee6 i think
@rose warren my bot's goal is to be basically the replacement for mee6, dyno, rythm et
etc
anyone know what TnS means
I'm getting sent cryptic messages now man
could be Terms of Service but theyre not explicitly saying what I could be breaching
what does ur bot do?
wait just learned what TnS means
trust and safety
ah
im pretty sure at least
Oh god
can somone giveme the codes for global crime and beg
Its against the rules
i have the code
global crime and beg? wtf is that
crime()
beg()
code
it is 30589f73-ad84-4cd1-b3cf-d2901cfe52ce
the code is 30589f73-ad84-4cd1-b3cf-d2901cfe52ce
im kinda annoyed discord isn't sending me anymore information besides that, where do i contact the TnS team?
i think dating services are not allowed..
even though i think the idea of your bot is awesome lol
@strong tundra whats the code for it
Speaking of that I need to check my email from discord
it is 30589f73-ad84-4cd1-b3cf-d2901cfe52ce
What part of we are not going to spoon feed you did you not get
@strong tundra whats the code
nah cap im pretty sure they verified one before
ok
or atleast another bot in topgg is requesting intents it's not whitelisted for
idk
i think you can contact them on the website somewhere
sorry cannot help u
generate code urself sir
U BAD
insulting people doesnt help anyone
no error but it doesn't remove the roles:
for role in ctx.guild.roles:
if role.id == 765213445997068319:
for member in ctx.guild.members:
if role in member.roles:
await client.remove_roles(role)
there is a function and everything else works; even the part of the functionafter this piece of code
@earnest phoenix I don't think client.remove_roles is a method.
But member.remove_roles(...) is one.
Also, why bother iterating over every role when you can just use a utility method to get one by ID.
o oops
You should be able to use discord.utils.get to achieve this: https://discordpy.readthedocs.io/en/latest/api.html#discord.utils.get
How to get a user's avatar in discordpy
ctx.user.icon..?
thats for embeds
ya i need for embed
so what should i do lmao
ok
embed.set_footer(icon_url = ctx.author.avatar_url)
so this wood work?
@normal sage
so if i need this: ```python
embed.set_footer(icon_url = ctx.author.avatar_url)
embed.icon_url(url = ctx.author.avatar_url)
the thing didn't work
like i did the command it didn't work
Whats the error
it doesn't show an error
it is kinda hard for me bc i run on aws and the errors are weird
Did you add text?
You should try that
how should i do that?
ok
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text = f"{member.guild}", icon_url = f"{member.guild.icon_url}")
embed.set_author(name = f"{member.name}", icon_url = f"{member.avatar_url}")
embed.set_thumbnail(url=f"{member.avatar_url}")
this will work?
Try it.
It tells me that I am missing 300 characters and in the description it does not let me write more
I think this issue is for #support.
This channel is for bot development support, not website related. Sorry.
wigh what
idk js, sorry
??
someone knows how I do so that I do not get null
i want to put something on party and idk how to do that
a
You can, however, make a pseudo-game for that purpose
There are a lot of tutorials about that
!join
Joined the VC.
Disconnected due to inactivity! Pay premium to have me 24/7!
Id pay to have you 24/7 erwin.
can I pay with thank you cards
Id pay to have you 24/7 erwin.
@solemn latch oh my, how lewd
how do I know, the number of guilds the user is in?
ooh! u sure
unless you're using oauth
hw to know the mutual guilds?
Ooh, I know
I could filter out, from client.guilds.filter(g => g.members.has('user-id'))
ye like guilds.filter(x => x.members.has(memberID)).size
Why i can't change my bot username
Don't have anyway to change username?
try contacting support
Ok👍
Any idea how long mongodb free cloud cluster would work?
or how many server specific configs i can handle with it
@earnest phoenix i thing the free one is don't have a time ,
And i think you can storage 500M+-
yea its around 500mb
Yeh👍
is it good enough?
Because i want to make sure before im gonna push my bot update from dev build to the release
For a basic app this is good but if you wanna storage higer than 500 you need buy it
any way to make it automatically clear a config if someone removes the bot from their server?
You can $pull it
ok
one more thing u think this will work to automatically update on dbl and the server amount in the status?
i have disabled the dbl part for now because i dont have the bot there yet because its not developed far enough
I think yes
👍
Why i have this error in this code
channel.guild.members.cache.get(entry.id).roles.cache.map(userroles => {
channel.guild.members.cache.get(entry.id).roles.remove(userroles.id).then(k=>{
})
});
message.guild.members.cache.forEach(member => message.channel.send(member.id))
Im trying to get every members id of a guild, but it shows only me and my bot, I have the guild members intent enabled tho
where did you enable it
@pale vessel wait
const client = new Discord.Client({ ws: { intents: ['GUILDS', 'GUILD_MEMBERS', 'GUILD_MESSAGES']}}) in my main file
const entry1 = await channel.guild .fetchAuditLogs({ type: "ROLE_DELETE" }) .then(audit => audit.entries.first()); console.log(entry1.executor); const entry = entry1.executor;
After this
@stable eagle try adding if (message.guild.members.cache.size != message.guild.memberCount) await message.guild.members.fetch(); before that line
@pale vessel actually works, ty
you can do that or enable fetchAllMembers in clientoptions
what is difference between, idle and time for collector?
message.guild.roles.map is not a function
@prime glacier roles.cache.map
@prime glacier
roles.cache.map
@rocky hearth same for filter?
roles.cache gives u a collection. Do whatever u want with it.
roles.cachegives u a collection. Do whatever u want with it.
@rocky hearth i meanguild.channels.filtertoguild.channels.cache.filter
?
ooh, yes
any python user?
We'll never know
Why i have this error in this code
channel.guild.members.cache.get(entry.id).roles.cache.map(userroles => {
channel.guild.members.cache.get(entry.id).roles.remove(userroles.id).then(k=>{
})
});
You can't use .catch() on something that's not a promise, map() is sync not async
Hey, just one quick question:
Is there something like a message count in Python? I want my bot to count the messages in a specific channel and after x messages the bot sends a message. Is something like that possible?
I have a code like this which I want to post:
channel = self.bot.get_channel(766360458872619060)
e = discord.Embed(color=discord.Colour.green())
e.add_field(name="Test", value=f"Test")
e.timestamp = datetime.utcnow()
e.set_footer(text=self.bot.user.name, icon_url=self.bot.user.avatar_url)
await channel.send(embed=e)
Anyone knows how to let node automatically use the newest version of a file instead of the version when the app started?
Without having to restart the app
Do i need GUILD_MEMBERS or the presence intents whitelist to get ids and such?
cos I am working with JDA, and when i run an eval it returns null for all ids but the bots.
@surreal sage reload the file
delete require.cache[require.resolve("path/to/your/file")];```
Is there a way to reload it all? @earnest phoenix
i could do like fs.readDirSync("./") and filter the node_modules folder 'n stuff
just reload the file you're requiring
delete require.cache[require.resolve("path/to/your/file")];```
does this also reload folders?
afaik?
as far as I know
hmmm
@whole knot length of channel.history with limit set to None but be aware that it'll take a while as it makes one API request per each 100 messages
So you could try caching message count manually and increment once a message is sent in the channel
@lyric lynx just check the html tag, or if theres any class and write some CSS on it
@surreal sage I think it does reload folders, you can try at least
@slender thistle Thanks for the help! :)

can we use nekos life api to make nsfw commands
No
What's thing === true ? 'true' : 'false' called?
ternary or elvis operator
can someone help me?
const { MessageEmbed } = require('discord.js')
module.exports = async (message, args) => {
if (args[2]) return message.reply('Please ask a full question')
const answers = ['My reply is yes', 'Maybe', "I don't think so", 'Absolutely', 'Better not tell you now', 'Signs point to yes', 'My reply is no', 'Ask again later', 'My sources say no', 'Without a doubt', 'Most likely', 'Outlook not so good', 'Signs point to no']
const answer = Math.floor(Math.random() * answers.length)
const question = args.slice(1).join(' ')
const ball = new MessageEmbed()
.setTitle(String([answers[answer]]))
.setColor('#bded11')
.setAuthor(message.author.tag)
.addField('Question', question)
message.channel.send(ball)
}
Error:
TypeError: command.execute is not a function
at Client.<anonymous> (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\index.js:87:13)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31) at WebSocketShard.onPacket (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (C:\Users\Gradea\Desktop\Bot discord\Raphtalia bot\node_modules\ws\lib\websocket.js:797:20)
ternary or elvis operator
ternary officially
Wrong channel
elvis operator? lmao never heard that name
Hi
but according to the wiki, elvis is more like a null coalescing operator rather than a ternary
Hello guys I'm having some difficulty with getting users upvote info with dblpy library and I must say I'm a bit confused
To be honest I don't even know how to use this library
can somebody please help me
#topgg-api is more suitable for that 
anyone by any chance know how to fix this? it constantly says "cannot read property of "roles" yet its the same ish code for my kick and ban command and they work fine
elvis operator? lmao never heard that name
@quartz kindle Kotlin moment
though I like it's origin more
embed: Embed size exceeds maximum size of 6000 I'm getting this error while sending more than 10 emojis.. is there a workaround for this?
nope
read the error
embeds have a maximum combined size of 6000 characters across all fields and description
as the message says 
its like 2000 for description, 1024 for each field, but not more than 6000 with eveything together
Your workaround is the need to send multiple embeds than
hi, i have this in my code
client.users.cache.get('idhere') but for some reason it returns undefined when the user is in the guild
pls help
the user isn't cached
use client.users.fetch(id)
await or use .then() since it's a promise
the user doesnt need to be in the guild
places SEX DM
^nani
how can i make my bot "type" before sending a response?
Jeez. I'd dynamically make it at that point
how can i make my bot "type" before sending a response?
Azure makes more sense
Idk off the top of my head, but I'd look at "deploying a service to Azure"
@earnest phoenix python
await asyncio.sleep(2)```
hmm
@earnest phoenix this can help u?
I am trying to create a Discord bot using NodeJS and DiscordJS. However, when I try to use the client.startTyping() function, referring to https://github.com/hydrabolt/discord.js/issues/440 and htt...
i don't try to use client.startTyping
xD
i use msg.channel.startTyping();
and it wroks
works*
but idk how to make it type for a while and then send the message
and stop typing bc the bot continues typing
¯_(ツ)_/¯
message.channel.startTyping();
setTimeout( () => {
message.channel.send( 'I tried to type' );
message.channel.stopTyping();
}, Math.random() * 3000 + 1000 );
@sterile ridge
@rocky hearth message.channel.send
maybe await the startTyping tho
how though??
actually, you should add await before startTyping method
channel.startTyping().then(channel.stopTyping);
I think this will work too!
you definitely dont wanna await startTyping, it will basically lock your code lmao
Yea
yeah, that is what, I was thinking
It's supposed to be ran in sync
actually its not, but djs just decided to do the weirdest shit ever
Wait oh, it's a promise lmao
what we want:
send startTyping, once finished sending, send message. the sent message will make discord stop typing automatically
what djs gives us:
send startTyping, but we cant wait for it to actually start typing. The promise resolves only after you send a message and discord makes you stop typing
Isn't there a delay that occurs before it stops typing?
5 seconds if you dont send anything
it will instantly stop typing if you send anything
(doesnt work for edits)
||why can't jda do that lmao it has like 1-2 second delay||
additionally, discord.js will continuously send startTypings until you manually call stopTyping, because it assumes you want to make it keep typing forever
lmfao
Lol
startTyping in discord.js is basically unusable
oh
Rip
if you want to use it the way its supposed to be used, you need to use client.api
thats what i do
Am I able to code a discord bot using C++?
Not rrcommended tho
of course you can
it's just a tag
that's not what i mean
for a really basic discord API wrapper there sure are a lot of questions about it
how do i run an if to see if the author has a specific role with a name or id?
Hey, real quick, the thumbnails and timestamps in embeds. What are those called?
dpy
Hey, real quick, the thumbnails and timestamps in embeds. What are those called?
@hasty mulch lib?
@hasty mulch legit what you just called them
They're called... uhm... thumbnails... and timestamps....
No, the general name
yeah. thumbnails and timestamps.
what you just said
They're called... uhm... thumbnails... and timestamps....
@umbral zealot ^
In the code...
wHAT LANGAGE
PRobably thumbnails and timestamps buddy
The language doesn’t matter!!!
yeah it does
Forget it
actually the library matters
thumbnails and timespams
timestamps
thats the name
the lang matters code wise
but those r general names
For example, discord.js calls it... drumroll... setThumbnail() and setTimestamp() , @hasty mulch

{
"timestamp": "cooltimestamp",
"thumbnail": {"url": "https://example.com/image"}
}
@hasty mulch this is literally what they look like in raw embed data
lemme guess the other is embed.set_timestamp(date=) ? 😄
there is no general name
I said to forget it
i think he gave up
Stop tagging me
oh dude sorry for helping
lmao
You didn’t help
Sorry we can't magically pull other terminology out of our asses, buddy
they did help you lol
we told you everything you need to know
they told you what they are called in both discord.py and discord.js
lol
pressed because he's right and refuses to accept it
I wonder if he wanted the word
Date and image
Those are the general terms for timestamp and thumbnail
becuz he said he doesnt want code
Oh
imo there are a couple active ppl in dbl
Ah
im not that active
lemme guess the other is
embed.set_timestamp(date=)? 😄
@umbral zealot Surprisingly no
i mean you awnser questions
@umbral zealot Surprisingly no
@slender thistle i dont think he wants that
It's embed = discord.Embed(timestamp=datetime_object)
has to be a datetime
wack
@slender thistle thos os what i use
Let me try this
timestamp = datetime.utcnow())
@slender thistle shut up before i string you
string me 😩
int(str("no u")) something is wrong, i can feel it
You mean manually re-assigning it? https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed.colour
i see why its a method now
it returns the color object
ahem
colour
where is danny from anyway
Embed(Color(0xFF0000)) ftw
No idea, but I love how both Colour and Color are valid
pog
yis 
Oh wew
Hello
It does not give an error
I entered a code, the bot runs, I run the command, it does not work
I am sending his codes, help me now
const Command = require('../commands/Command.js');
const { MessageEmbed } = require('discord.js');
const fetch = require('node-fetch');
module.exports = class DogCommand extends Command {
constructor(client) {
super(client, {
name: 'dog',
aliases: ['puppy', 'pup'],
usage: 'dog',
description: 'Finds a random dog for your viewing pleasure.',
type: client.types.FUN
});
}
async run(message) {
try {
const res = await fetch('https://dog.ceo/api/breeds/image/random');
const img = (await res.json()).message;
const embed = new MessageEmbed()
.setTitle('🐶 Woof! 🐶')
.setImage(img)
.setFooter(message.member.displayName, message.author.displayAvatarURL({ dynamic: true }))
.setTimestamp()
.setColor(message.guild.me.displayHexColor);
message.channel.send(embed);
} catch (err) {
message.client.logger.error(err.stack);
this.sendErrorMessage(message, 1, 'Please try again in a few seconds', err.message);
}
}
};
@earnest phoenix u need to have a group name
If possible, give me the relevant code
are you using Commando
NO
any errors?
It does not give any error
shardededed
Shard:
but
rn it says
Shard: 3
i want it to say
Shard: ?/3
and what shard they are on
That is called channel abuse
?
u could have written 1 character per message
I havent sharded yet, I dont remember if shard.id gives a full timestamp id or if its just a count
timestamp id?
Help Me [Pls 
you can use `${guild.shardID} / ${client.shard.count}`
Oh intresting
What specifically isnt working @earnest phoenix
No returned message at all?
Is your embed sending but no image
Or is the error line being sent etc
the command doesnt work and theres no error
@earnest phoenix Give more info
I hit the command but the robot shows no reaction
And I do not receive an error on the console
try logging random values, and see if its even reaching to the code
It does not work
like can you do
?help dogfor example
@pale vessel
some bots are setup in a way that you dont have the ?help dog
I use one but it doesnt have the ?help dog feature
And if they don't the bot developer in question should know this and tell us that
these would be useless otherwise
yeh
can you debug @earnest phoenix
add a console.log("executed") inside the first line of try for example
the command isn't registered as a command
Okay?!
like if you had all your commands on a table, that command you're trying to use isn't on the table
So what should I do now?
They are similar, they are no different
can you show your ping command for comparison?
module.exports = class PingCommand extends Command {
constructor(client) {
super(client, {
name: 'ping',
usage: 'ping',
description: 'Gets Calypso\'s current latency and API latency.',
type: client.types.INFO
});
}
async run(message) {
const embed = new MessageEmbed()
.setDescription('`Pinging...`')
.setColor(message.guild.me.displayHexColor);
const msg = await message.channel.send(embed);
const timestamp = (message.editedTimestamp) ? message.editedTimestamp : message.createdTimestamp; // Check if edited
const latency = `\`\`\`ini\n[ ${Math.floor(msg.createdTimestamp - timestamp)}ms ]\`\`\``;
const apiLatency = `\`\`\`ini\n[ ${Math.round(message.client.ws.ping)}ms ]\`\`\``;
embed.setTitle(`Pong! ${pong}`)
.setDescription('')
.addField('Latency', latency, true)
.addField('API Latency', apiLatency, true)
.setFooter(message.member.displayName, message.author.displayAvatarURL({ dynamic: true }))
.setTimestamp();
msg.edit(embed);
}
};
(node:25) UnhandledPromiseRejectionWarning: Error: Error: Cannot find module '/home/container/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.28/opus.node' Require stack:
Hes claiming that it was working on pc and that he has everything correctly in package.json
7
Just because somethings in package.json doesn't mean it will install
Opus has some dependencies afaik.
Is your dog command in the correct folder @earnest phoenix
Guys, is there a way to make my bot linked to a website's database?
yes
Is your dog command in the correct folder @earnest phoenix
@solemn latch
Depends, is it your site and your bot?
how about if it is not my website
Honestlt @earnest phoenix I have no clue
@earnest phoenix get permission from the website owners, or use the websites api.
maybe try restarting your bot
okay, thanks
@earnest phoenix get permission from the website owners, or use the websites api.
@solemn latch should i intercept the api?
Yeah, if they have an api use it to get the relevant information.
Did you restart your bot when I asked about errors on startup?
Also, maybe kinda silly. But did you save the dog command file?
I dont see client.logger as a property.
it's their own thing i guess
Well, even if it is, the error says it doesn't exist.
I dont see client.logger as a property.
@solemn latch
} catch (err) {
message.client.logger.error(err.stack);
this.sendErrorMessage(message, 1, 'Please try again in a few seconds', err.message);
}
}
};
Yeah.
Your using message.client.logger but I dont think that's a thing
can someone DM me if u know about music bots bc mine is broken and we dont know how to fix it
@earnest phoenix you can try providing more info here
maybe one of us can help
@earnest phoenix please just ask your questions, don't ask people to DM you, it's best to solve this as a group.
no one wants to dm some rando just to help them with a bot
unless you're bored or something
Yeah.
Your using message.client.logger but I dont think that's a thing
@solemn latch i deleted ??
???

say what now
TypeError: Cannot read property 'error' of undefined
} catch (err) {
message.client.logger.error(err.stack);
this.sendErrorMessage(message, 1, 'Please try again in a few seconds', err.message);
}
}
};
does someone know any service that can act as a "retry until status 200" for APIs?
or if nginx can do this
Yeah, client.logger doesn't exist.
I am not sure what that line is doing. If you know what that lines doing, fix it or remove it if you dont need it.
ok wait
I just need to figure out a way to prevent missing POST requests
nay
We don't spoonfeed code here
Also, economy requires a database, not something you can copy paste.
Use an inline element on both cards @low orbit
ReferenceError: args is not defined 
Oh, you can convert blocks into inlines?
yes
const member = this.getMemberFromMention(message, args[0]) || message.guild.members.cache.get(args[0]);
I guess I never needed that since I used inlines from the get go
@solemn latch ReferenceError: args is not defined
Is this a seperate issue?
@solemn latch Yes Sry
Can I see the command this is for?
Can I see the command this is for?
@solemn latch Yes Wait
is the second one inline too?
@solemn latch
name: 'addrole',
aliases: ['giverole', 'addr', 'ar'],
imagine if they used the middle finger emoji accidentally
I deserve the middle finger one anyway 
imagine if they used the middle finger emoji accidentally
@pale vessel
I deserve the middle finger one anyway
@solemn latch Nooo
Pls Help Me PLS V
So your not requiring the args in your message
You should pass on the args, or make a new set of args
TypeError: this.getMemberFromMention is not a function
fffffffffffffffff
i'd play around with the styling if i have access to the site
I dont know where you are getting these properties.
But they are not in the default djs
can you make both of them inline?
Me ?
what do you mean
like
apache man
Apache man, the super hero
yes
im using windows and for some reason cant install
better than nginx
debatable
but we all know lighttpd is the best
asterki just install XAMPP or something
makes your job easier
yes
anyways
uwu
i'll be more active here, in this channel
i need, learn a lot of stuff
155mb, so much data
im not sure what im looking at
where is the user info table
im assuming theres supposed to be one
I'm making an api using request but if i log the responded body it does it fine, but if i try to log a specific property it returns undefined
are you sure the body isnt a string
{
"bin": {
"id": "server-gg-testing1",
"readonly": false,
"bytes": 23,
"bytes_readable": "23 B",
"files": 2,
"updated_at": "2020-11-06T17:28:40.677982Z",
"created_at": "2020-11-06T17:11:18.910703Z",
"created_at_relative": "17 minutes ago",
"expired_at": "2020-11-13T17:28:40.67795Z",
"expired_at_relative": "6 days from now"
},
"file": {
"filename": "package.json",
"content-type": "text/plain; charset=utf-8",
"bytes": 20,
"bytes_readable": "20 B",
"md5": "ca7ac0fa4c21304cd5e235c71fcee577",
"sha256": "d6731e554ea5c2da5236ab2153897bed43cf1f2c882ae5ce61ac5d32bbf7253d",
"updated_at": "2020-11-06T17:28:40.510114Z",
"updated_at_relative": "now",
"created_at": "2020-11-06T17:16:10.228908Z",
"created_at_relative": "12 minutes ago"
}
}``` this is what is returns
what is undefined
i'm trying to log .bin
can you show your code
const request = require("request")
const fs = require("fs")
async function upload(bin, file_name, file_data) {
request.post("https://dev.filebin.net", {
headers: {
bin: bin,
filename: file_name
},
body: file_data
}, function (err, res, body) {
var data = res.body;
console.log(data)
})
}
module.exports = {
upload: upload
}
upload("server-gg-testing1", "package.json", "{ 'message': 'hey' }")```
what version @sand dune
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile astralounge/trialstaffpage/.htpassword
Require valid-user
how come that doesnt work
i use github for my site
what is undefined though
uh stringify it
wut
hOw dO i ConVeRt iT to An JsON obJECt
lmao
you were close
you only needed to change it to fs.writeFileSync("file.json", JSON.stringify(data))
i don't want it in a json file
How do you invite your bot to your server?
getting this error with the dbl.js lib
(node:24) UnhandledPromiseRejectionWarning: Error: 404 Not Found
at IncomingMessage.<anonymous> (/home/container/node_modules/dblapi.js/src/index.js:118:25)```
any clue?
came out of nowhere
not sure where it's erroring
@surreal sage are you sure res.body is an object? do console.log(typeof res.body)
if it returns "string", then you have to parse it into an object: JSON.parse(res.body)
i have ```js
bot.dbl.getBot(bot.user.id)``` on startup @solemn latch
it errors on startup
havent restarted the bot in like 2 mins but it did it twice, should i check the (/home/container/node_modules/dblapi.js/src/index.js:118:25)
ah
rip
cloudflare stuff
is there any key difference in enmap and enmap-mongo except the difference in declaration and connection?
wack
probably, but its hard to say without looking at the docs for each
How to cheak my bot is logged
logged in?
logged ?
I mean that is on queue for verification
Okie
Found out enmap-mongo is depracated
@quartz kindle that was the case, thank you!
anyone know in js how I would take a long array and only use a specific part of it like an array that has 1000 values in it but I want the first 100 or second 100
I know I should probably use .slice() but I can't figure out how to get the correct values
what like array.slice(0, 100); array.slice(100, 200);
if you want the first 100, the best and fastest way is to do array.length = 100 lmao
hmm I will try this
how would i use cronjob to like run a task even if i reset the app
const first100 = array.length = 100 
that would just output 100 lol
yes
const first100 = (array.length = 100, array); 👀
If you change it's length then you modify the array though
depends, if he only needs the first 100 then
oh
Why does the bot become offline when adding a code, but the code is clean
flaze big brain
@crimson vapor can we do that
@raven orbit wat
im not sure I use js
no idea
Uf
but js is meant for browsers so probably
Lemme try js
@weary quiver you mean just coding or also hosting on a phone?
Codin
because just coding, its perfectly possible, just download one of many code editor apps
but actually running the code on the phone is a bit more complex
But I also wanna do hosting
@quartz kindle I added some code to my bot project, but suddenly it went offline. I do not know the reason. I checked everything. I do not know what's the reason
but actually running the code on the phone is a bit more complex
@quartz kindle true
@raven orbit where is your bot running?
linux ubuntu
via ssh?
yes
I assume you reran the script after making the changes?
do you use a process manager? like pm2/nodemon?
no jast use node js
and if you do node yourbotfile.js what happens?
It works normally but becomes disconnected after a while
no
so the ssh is always open, and showing logs right?
does it show any error when your bot disconnects?
yes always open and i use screen
does the process exit and you have to run it again?
I checked everything until I called the service provider and didn't know the reason
do you exit the screen after running you bot? or are you always with the same screen window open?
No error, everything works fine after that it goes offline so i start it again and same problem
i dont exit screen
When I got this problem working I kept everything open
does your bot output any logs? from console.log and such?
what are the last logs before it exits?
the last logs is " Bot up RxBot "
and then it just quits as if you pressed ctrl+C?
Just wait for what happens and nothing seems to go offline
does it work normally again if you remove the code you added?
yes
can you show the code you added?
yes in your DM




