#development
1 messages · Page 1763 of 1
I think the only way you can debug this is to launch your bot's process on a different host machine with a different network than your current VPS or a dedi, and see if it still persists; I couldn't think of a better way to debug this since there's a really low chance its caused by the bot itself
I don't own a machine myself powerful enough to run Chip, and I really don't want to buy a server just to debug this kek
the issue persists even with a barebones bot?
like really barebones, not just disabling your intervals
I suppose I can test that
Doesn't seem like it, I've got my Helper bot also running on the same machine and that seems unaffected
I suppose I could be Event Loop Lag
Is this a thing...
if (mbChance >= 1 && mbChance <= (premium === true ? 5 : 3)) received = true;
is what a thing
If mbchance is great than 1 and less than (for premium 5 but normal 3) then received === true.
yo so i have: https://hastebin.com/onupohozaf.js and im wondering how i can like, make it so you can remove the million slice functions and just make it do it itself, any ideas?
if anyones used it and can guide me in the right direction, im using eris-pagination if that helps
for loop?
yeah im clever ik, ty
yes that's possible and a thing, but you're checking if its greater or equal to 1, and if its lesser or equal to 5 or 3
how can i make if so if i hover on an element
if affects another?
opacity: 1;
}```
this no worky
That's what I want. 😊
@quartz kindle @earnest phoenix Update™️
Appearently, outgoing presence updates will block and backpressure that entire shard until the presence update finishes updating in all of that shard's guilds
I was sending those every 10 seconds (Don't ask why, I don't know why)
im not the best at frontend, but try using js. thats what i do when css is weird for me
but im not the best guy to take client side advice from
idk why its not worky
interesting
Oof.
Interesting, no idea why u were doing that but all good 
if this is really whats going on, then discord is synchronously updating the guilds in their backend
which sounds very stupid
Blocking I/O moment
Discord's backend is written in Python and Python is not really "asynchronous" which might be the reason
Can I get some help vsc won't do anything for cshap
didnt they already switch many parts of it from py to go, then from go to rust?
lel
You mean no intellisense or auto completion?
You gotta install an extension for it
I did
Did you enable it?
wdym
get_event_loop().create_task ftw
yeah lol
You're supposed to enable the extensions from the settings or the extension panel; if it still doesn't work, try reloading VSC
alr yeah, so im having trouble of what to put inside it. bc it works but how do i separate like, every 6 mod logs
if that makes sense
Its enabled and I have reloaded vsc many times
I think they did, I'm not sure
its prob in the dev logs if they did
¯\_(ツ)_/¯
Then you're probably using an old version of VSC, the old version had a bug where some extensions weren't working properly
What VSC version are you on?
anyone know how to resolve my issue btw?
for loop that goes until var is 6
but then thats only going to show 6 logs
give us more context
then refine your question
Then no idea how it doesn't work for you, which extension did you exactly install?
recommend was the c# plugin by microsoft
is there a way to make the BOT reply that he's not in a Voice Channel if he gets asked to leave it?
Can you show us an screenshot of the extension screen you installed?
check if the bots in the voice channel?
like, lets say a user has 12 mod logs, i want to use eris-pagination so it shows 6 logs on one page, and the other 6 on another. i can get it to only show 6, but then how do i make it show the other 6 after without like, hardcoding, 6, 12, 18, 24 etc
im so bad at explaining things idk if this helped at all
yeah i've tried making a const with the client_channel = client.voice.channel
The screen, the whole extension screen; not the small label
couldnt the bot be in multiple voice channels at once though, including other servers
any idea, aki?
Then that should work, strange
couldnt you just loop through the logs, then add to a map for pages?
😦
What lib are you using?
volt any idea on how to fixx
nope, no idea how its not working for you
node.js
discord.js
Node.js is a runtime, not a lib; discord.js? Eris? Detritus?
im just guessing as you ssaid the runtime
yeah sorry, i ment discord.js
I'm trying to do something like the first one
but with the bot instead of the user
Then check if <Guild>.me.voice.channel is null
e.g. !message.guild.me.voice.channel
volt i needs helps
thanks!
Gotta check that extension's issues and see if any of them references your issue
Brb
@solemn leaf I think this should resolve your issue
https://github.com/OmniSharp/omnisharp-vscode/issues/2509#issuecomment-420318250
@earnest phoenix where do I get that version
The comment above the comment I linked provides a link
ah
idk whats it doin now
installin things
still nothin
still isntalling packages it says?
but I click on it and it says not found so
Then no idea
Rip
alr so im back being stuck
can anyone help fix my problem, im so confused
its here: #development message
const description = moderations.map((e) => e.reason.slice(0, 5)).join('\n')
{
title: `Viewing ${member.username}'s moderation history`,
description
},
{
title: `Viewing ${member.usernames}'s moderation history`,
description
}
];```
is it possible to update an array element at an index in mongodb?
it is
do we have to retrieve the entire array first? like in firestore?
so how do mongodb handles when there are multiple updates happen to the array at the same time?
hi can i have to client.user.setActivity in my bot or not
it doesn't update everything at once
okey
in what context ur asking, its not required to run the bot though
so 1 is help and 2 is in how mutch server is the bot
yeah, but what if, a client request to delete element at 5 and other client request to update it same time. Then the element at 6 will get updated
Well you have to handle that, not your db
got this wrong lol
i mean
hi can i have 2 client.user.setActivity in my bot or not?
nope
but u can update it recursively in an interval
and how i do that?
u can use, setInterval
okey
keeping a timeout of 1min would be okay
what?
How can I get the events of web socket as docs on discord.js
What does it mean chunk?
just curiosity
anyone think they can help m,e with vsc not working when trying to porgram c#
no formatting or intellisence
or templates
c# on vsc...
yeah?
what are you? a masochist?
wdym
like, vsc is just a fancy text editor, nothing more
cough cough
its coding assistance is minimal (but enough for smaller langs like js or python)
No it isnt
if you say so...
not true - vsc extensions are super powerful
have you tried the c++ one?
it's better than VS'
Im using the csharp extension by microsoft
it's like saying minecraft has tameable pokemons
I would rather you help me then just push everybody away from my question by saying whatIm using is trash thank you
I'm not
You just did
I'm saying that vscode is not supposed to be used as a fully fledged IDE which it isnt
Did I ask
yes
so your iq is negative too?
so is your education
mhm I have been an a and b student my whole life
I see, so you only have that kind of education
anyway
don't want the truth then go search on google a solution for your issue
so can notepad.exe
Might as well learn machine code
¯_(ツ)_/¯
well thats what you get someone who streams league of legends, and has been actively on reddit for 2 years
Ill just go ask somewhere else
Is promoting services of bot owner banned by ToS?
that's kinda a grey area
depends on what frequency we're talking about and what content
imma ask dis.gd/request then
just use common sense, if it'll be shoving ads to users then it's illegal
or promoting nsfw content
I wanna add command that will tell about service
is it on-request?
y
if so, then it's fine
you just can't do stuff like mass-dm ads or constant ad messages
Hi, does anyone know if there is a way to make a dashboard website with a python bot?
well yeah, probably using something like django or whatever web framework you have in python
There is. Just have a webserver that serves proper HTML, CSS, and JS
Quart, aiohttp.web, Flask, Django
anyway to communicate javascript with lua
from flask import Flask, render_template
app=Flask(__name__)
@app.route('/')
def home():
app.route('/')
return render_template("index.html")
@app.route('/commands/')
def about():
return render_template("commands.html")
if __name__=="__main__":
app.run(debug=True)```
I’ve made this as a tutorial says and I did all the files but it says that it can’t connect to the server
Tutorial link: https://pythonhow.com/source-code-simple-website-with-python-html-and-css/
How to execute the code Create an app.py file and copy-paste the #app.py code there. Create two folders named templates and a static folder. Those folders should be in the same directory with your app.py file. Create three files inside the templates folder, layout.html, home.html, and about.html and copy-paste the code of #layout.html, #home.htm...
Is anyone good at css and try to make my bot Description better
we can give tips, but "better" is subjective
most css bot descriptions look bad anyway
Any1 knows what’s wrong?
this is my nextjs tsconfig file.
I'm trying to enable, strict mode
but it is not working for some reason.
I tried relaunching vsc, no luck still
https://i.callumdev.xyz/0eh00.png
I have a .d.ts file for my global types, but vscode fails to recognise them. It compiles just fine.
yo guys, any idea why this.embed may be undefined?
https://hastebin.com/tebuxasuka.js (i took a break from coding for like 6 months so i might be doing something rly stupid)
line 10 btw
I think the issue is the arrow function
Since it plays around with "this" differently than a standard function
Try it out and see
Then it probably doesn't work
But it is in docs
What is the error you're receiving
let EMBED = new Discord.MessageEmbed()
.setColor('RANDOM')
.setTitle('Un membro si è unito a noi!')
.setDescription(Benvenuto in ${member.guild.name} a ${member}!, ora siamo in **${member.guild.memberCount}** in questa Community!🎉)
.setFooter('Bot ideato e creato da Cristian Grossano 💡')
.setThumbnail('https://cdn.discordapp.com/attachments/825743947158519808/839561168972414976/nova_bot.jpg')
.attachFiles(attachment)
channel.send(EMBED);
this is my code
andd it says that cant read the property of MessageEmbed()
What's the value of "Discord"
const { MessageAttachment, Discord, guild } = require('discord.js');
There's your issue
y?
Discord.JS doesn't export a Discord object/class/etc.
It's usually used to refer to the entire export
What you should do instead
Is replace it for MessageEmbed
So you get the MessageEmbed class
Replace Discord.MessageEmbed for MessageEmbed
it doesnt work
And should work if done correctly
already did
Then you're likely using it incorrectly
Hello how can I add a toLowerCase to this function?
const wordsreact = [
"Hello",
"Hi",
"Hey",
"Yo"
]
if (wordsreact.includes(message.content)) {
return message.react(":wave:");
}```
You could have each string in the wordsreact array lowercased (Hello becomes hello) and use message.content.toLowerCase() for the lowercase content from the message.
Yes but it tells me that toLowerCase is not function);
Can you show how you're using it
yeah i fixed that part
and it turns out eris-pagination is just broken
anyone know any alternatives to eris-pagination?
You're supposed to call .toLowerCase() on the .content
.includes(...) returns a boolean and wouldn't make sense given any context.
You could write your own paginator.
cbfa too long
like this ?
Yes, but you still haven't updated the wordsreact array.
Each string should be lowercase
Hello to hello, Hi to hi, etc.
It's fine
Thx its good
🙂
I did not know that it was necessary to put everything in lowercase x)
Hello, can anyone who knows the Discord bot tell me if it is possible what I intend to do?
Your question is ambiguous.
Do you own the Discord bot? Are you using someone else's Discord bot? What do you need help with?
I created a Discord bot and I need to do his commands and I want to know if it is possible for him to do some actions
It's possible, but what the actions are will determine how hard it'll be to implement.
What are you using to develop your bot?
node.js
index.js visual studio code
May I ask how much experience you have writing JavaScript and Node.js applications?
I'm starting to learn
Then you may want to follow a guide or take more time to learn.
I want to develop my bot, but want to know if it is possible for him to perform some actions. |
my bot is already active, but the only thing it does so far is to answer pre-programmed questions
youll have to program that.
👀 pretty standard stuff
do i use another one?
no need, its standard stuff
What are the minimum requirements for listing your bot?
that it works
and has a bare minimum of utility
ie, a help command and at least one or two working commands
Like mute?
anything
So this may be enough?
but keep in mind, top.gg is a website to publish bots that are ready for public use
so you might wanna wait until your bot has stuff people are looking for
Oh i see
AT least the commands work
hello
How can I make this property of changing the nickname of a user work?
user.setNickname(nickk)
^
TypeError: Cannot read property 'setNickname' of undefined
looks like the user variable is undefined.
cant read property "setNickname" OF undefined
meaning
undefined.setNickname()
isnt a property.
I have an image, I want to use it as an emoji temporarily, any other way except creating an emoji in guild?
nope
i've fixed it, ty
how can i do for do a list with user permissions?
WHAT permission a bot need to use guild.fetchInvites
Please tell
can anyone help me
has to have the intents on?
how do i define library?
ohh
bots before the update still have a library

which intents?
the presence intent is needed?
guild member intent
yeah, just keep both the intents on
discord suddenly disallowed my bot's presence intent
server member intents is on
and my bot has manage server perms too
but it's not able to fetch the guild invites
is it verified?
yeah
it got verified with both intents
but one day they took it
idk why
no mail nothing
hmm??
i mailed them
and it has been 1 month
but how can i fetch the guild invites
can i do without presence intnet
you do need the guild member intents
that is there
but still it's not able to fetch
i have given the bot admin, audit log and manage server perms
well, as far as I know you need both intents on
try the intents with the beta bot?
yeah
you need to state it in your application
when you submitted to discord
``` i am right?
i am confused about that
["id", "anotherid"].includes(message.guild.id) === false
I want to ignore everyone except 3-5 guilds
either make an array with the guild ids you don't want to ignore
const guildIds = [id1, id2, id3]
{message handler}
if(!guildIds.includes(message.guild.id) return;
Or filter for every guild in a long if statement
{message handler}
if(message.guild.id !== id1 && message.guild.id !== id2 && message.guild.id !== id3) return;
Any idea how to make filter commands like groovy? Like any package and i am a javascript developer
@gaunt stag If you use lavalink with a library like Shoukaku you get relatively easy access to filters, else it should also be possible with ffmpeg using a library like prism-media
Lavalink is also better performace so you might as well switch now
how can i do for do a list with user permissions?
// !!!!!!!!!!!!!!!!!!!!!!!!!! P E R M I S S I O N S !!!!!!!!!!!!!!!!!!!
client.on("message", (message) => {
const args = message.content.slice().trim().split(/ +/g );
const command = args.shift().toLowerCase();
let member = message.mentions.members.first()
if(command === "-perms" || command === "-perm" || command === "-permisos") {
if (!message.member.permissions.has('MANAGE_ROLES')) return message.channel.send(`No tienes permisos | \`"MANAGE_ROLES"\``)
message.channel.send(`${member} Tiene estos permisos: **${member.permissions}**`)
}});
like: "ADMINISTRATOR", "MANAGE_GUILD", "MANAGE_ROLES" etc
member.permissions.toArray()
you can pass an array to message.member.permissions.has
lavalink works with javascript right?
I still do not understand that, could you give me an example if it is not a nuisance?
There's a wrapper for most languages so yes
Yeah, you need to use a library for javascript
wrapper*
message.member.permissions.has(['MANAGE_ROLES', 'ADMINISTRATOR'])
this has worked for me, thank you very much
It's an array of permission strings
is there a way to order them to look more formal?
You can use array.join()
You can split the strings by underscore and capitalize every first letter
how is that?
Use array.map()
ill try
message.channel.send(`${member} Tiene estos permisos: **${member.permissions.array.map()}**`)
^
TypeError: Cannot read property 'map' of undefined
member.permissions.toArray().map()
also map requires a callback function wich return the element to set at that permission
ShahahHah
message.channel.send(`${member} Tiene estos permisos: **${member.permissions.toArray().map()}**`)
^
TypeError: undefined is not a function
ok how to do that
You need to use array.map(), string.split() and array.join() inside the map
forgive me if I don't understand some things, my main language is Spanish
read the mdn link
i've to do an array with permissions ?
You need to .map on the array with permissions yes
I have never done a .map, could you give me some help with that? I'll do the array first
I sen't you the mdn link of Array.map, have you read it?
It gives a pretty good explanation of how to use .map
Okay then when I have time I'll read it, I need a bit of a translator I still don't speak English well
@earnest phoenix On the top of the page you can change language
á
cool
ok then tomorrow I'll take care of that myself, something else
How can I do to put the comparison of roles, (example) if a role is higher than mine, the bot cannot interact with the role highest
I am a moderator, and I want to give the administrator role with a command, the bot tells me that I do not have permission to do that because my role is lower than that
with this ¿? or .highest
ask in https://discord.gg/Gr678CH
message.guild.members.cache.get(args[0])```
How to get an "user" an not a "guildmember"
message.guild.members.cache.get(args[0]).user
or access the UserManager cache
probably safer to do it that way in case some crazy race condition happens where the member is no longer available and is de-reffed from cache
Perhaps I sanity check too hard
const fetch = require("node-fetch")
async function chat(text){
fetch(
`https://api.monkedev.com/fun/chat?msg=${encodeURIComponent(
text
)}&uid=0101`
)
.then((res) => res.json())
.then(async (json) => {
return json.response
})
}
module.exports = {chat}
```My module
```js
if(message.content != ""){
message.channel.send(chat(message.content))
}``` my command
Error :- cannot send empty message
Return json.response
So how can I fix this
My module is working good but I have an error
Code
client.on("message", message => {
if(message.content != ""){
if(message.channel.type === "dm"){
if(message.author.bot) return
chat(message, message.content)
}}
})```
Error :- cannot read property 'id' of null
Ping me if you got it
@lavish bramble help me
i need you to help me cuz i dont need help 😊 🧠
@delicate zephyr or @spare badger how much it takes to review my bot?
How much?
i mean like how much time it takes
The queue currently takes around 3 weeks.
3 weeks!?!
i thought like 2-4 hours
anyone know how I can replace this thing
<div>
<SomethingA>
</div>
to
<div>
<SomethingB>
</div>
btw React.js
const random = require("something-random-on-discord").Random
const discord = require("discord.js")
const client = require ("discord.js");
module.exports = {
name:"joke",
description: "random joke",
run:("message",async message => {
let data = await random.getRandomJoke()
message.channel.send(data)
})
}```
let data = await random.getRandomJoke()
^
TypeError: random.getRandomJoke is not a function
Math.random
is better
ahh
sr
@torpid otter where did u get the package?
@torpid otter check what version is the package
i dunno, maybe the package error
is anyelse joke pack is good
Depends if you are sharding or not.
do you really think someone asking this kind of question has a sharded bot

well it happens something :)))
LMFAO
my slap command not working
error = new Error(error);
^
Error: Unsupported MIME type: image/webp
const Discord = require('discord.js');
const DIG = require('discord-image-generation');
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "slap",
description: "ask qustion ",
async run (client, message, args){
let user = args[0] || message.member;
if (typeof user == 'string') {
user = user
.replace(/</gi, '')
.replace(/@/gi, '')
.replace(/>/gi, '')
.replace(/!/gi, '');
user = message.guild.members.cache.get(user);
if (!user) return message.channel.send('User doesn\'t exist');
}
let avatar = user.user.displayAvatarURL({ dynamic: true});
let avatar2 = message.author.displayAvatarURL({
dynamic:true
})
let img = await new DIG.Batslap().getImage(avatar2, avatar);
let attach7 = new Discord.MessageAttachment(img, "slap.png");;
message.channel.send(attach7)
}
}```
get the avatars in png format
what sorry
where so
did you copypaste that code
nope
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
how do you not know how to get avatars in a format then lol, you're using the method for it
https://discord.js.org/#/docs/main/stable/class/User?scrollTo=displayAvatarURL and see the options object
rerender with a different children prop
why are you creating avatar and avatar2, you can use the same variable twice, yk
i am dumb
@delicate zephyr and @spare badger is there any exceptions for bot reviewing like giving link and bot reviewer reviews it? if so link is (https://top.gg/bot/843467356541419520)
There are no such exceptions
i've got a react question too
if i have a component that renders another with similar props how can i pass all of them at once?
function GreenButton(props) {
return <button class="green-button"></button>
}
Your bot is reviewed when it's its turn
that's not how things work
{...props}
ty
now i can finally make my children.map function 200+ characters long
does anyone know how to make like dank memer spank png i am using dsicord.js and i am a beginer
does anyone have the code for it?
there is no "code for this thing" there is only explanations
you should learn how to do it, not ask for code right away. Take a look at node canvas
so can anyone explain it
shouldn't you pay attention in class?
The tutorial is for creating a welcome image but it can be applied to anything

Comprehension
how old are u
act*
16
How to arrange codes in different file
in express
like diff routes in diff file
make a handler that reads all the files and attaches the listeners accordingly
similar to a command handler
ima leave that class and see what happens
have a separate folder for each path and it's sub-paths
const channel = member.guild.channels.cache.get('channel-id-here');
if (!channel) return;
channel.send("text-here!")
});``` my code ^^
@cinder patio @earnest phoenix it says unexcpected token (bot)
@late iris help me
or @earnest phoenix help me
or anyone help me
you might want to learn the basics of javascript first before trying to make a bot
?
Stop pinging everyone lol
ll
but why are you mentioning random people doe@trail abyss
i just need help
i meantion people from bot developer role
TO HELP ME
Dont ping random people
this is about the best help someone can give you is this case
Do you know basic javascript
You have to learn before making a bot
i am hosting it on glitch
but its 24/7
So?
can u help
did you read my message
TypeError: Cannot read property 'members' of undefined
are you sure you've actually got a message object
also
you're recreating a static array every command invocation
don't do that
dude I am done
I have been trying this for hours
it's not wokring
Help me jesus christ abpiagsbpuasfb
sounds about right

This is my file /routes/v4/ai.js
let betaAI = require("./routes/v4/ai")
app.use("/beta/ai", betaAI)
my index.js file
where is the issue?
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.```
no issue
no error
just this when fetching
Bruh, It's illegal
You are saying to me?
yes
How? Ugh
that's because I removed my private servers's URL
djs13 is pog
looks like CORS is fucked
CORS is fine
It works fine on other endpoints
just this stupid
endpoint
because I am first time doing codes in diff file
other wise earlier all were in one file
if that was the case other things won't work as well
Yeah, node-fetch doesn't implement credentials AFAIK
That it isn't cors.
Lawl
uh may i ask what this does?
asyncio.WindowsSelectorEventLoopPolicy()
It's a policy for asyncio.
i know but it had error otherwise if i didnt do thart
what are the 6 letters / digits after a .png in a css file ?
because I want to modify a webpage using css, replacing the .png to put mine, but the end of the .png file is "wiki.png?XXXXXX"
(node:11220) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled.
(Use `node --trace-warnings ...` to show where the warning was created)```I'm facing this problem!
why are you running a 32 bit installation of your os
microsoft is completely dropping support for 32bit soon
how do you make stuff like this
what exactly?
I think he means the offline screen
maybe that appears when the page fails to make a http request
yeah
it probably has to do with how replit works, idk if they use http requests or a ws
if they use a ws its super easy
ig it would also be easy with http
imagine opening a ws or sending an http request when there's no internet
i just typed replit.com in the address bar when my wifi was off
The html can be cached
the browser will still try to make the http request, and it'll fail
Any idea how to make music command with lavalink? Javascript
@wary swan yo
puppeteer.launch().then(async browser => {
const page = await browser.newPage()
await page.goto('URL)
await page.evaluate( () => {
let elements = document.getElementsByClassName('iva-item-root-G3n7v');
console.log(elements + 'test')
});
// browser.close();
});```
doesnt work and i dunno why
console.log logs nothing
it is console logging in the site 🤔 did you check there
wait wym
well ok i got it
still
hmm it should work maybe it was giving undefined because you are logging a variable out of scope
let elements;
puppeteer.launch().then(async browser => {
const page = await browser.newPage()
await page.goto('')
await page.evaluate(async () => {
elements = await document.getElementsByClassName('iva-item-root-G3n7v');
});
});
console.log(elements + 'test')
Console log is happening before any of the awaited stuff runs
Ya
uhh
await it
.then means come back to this later, when the promise resolves.
You'll want to await, or move the console.log inside the .then callback
you're doing it wrong
const elements = await page.evaluate(async () => {
return document.getElementsByClassName('iva-item-root-G3n7v');
});```
The function you provide to evaluate actually gets turned to a string and executed on the browser
And the browser and your node app do not share memory
still undefined

show your new code
puppeteer.launch().then(async browser => {
const page = await browser.newPage()
await page.goto('URL HERE')
const elements = await page.evaluate(async () => {
return document.getElementsByClassName('iva-item-root-G3n7v ');
});
console.log(elements + 'test')
});```
try [...document.getElementsByClassName('iva-item-root-G3n7v ')]
and make sure iva-item-root-G3n7v is actually exists - parts of it look randomly generated
And that empty space likely has to be deleted
yeah its here
remove the empty space at the end
undefined
probably because puppeteer cannot return HTML objects then
it can
try document.getElementsByClassName('iva-item-root-G3n7v').length
I'm 99% sure it can't
i dont know much dom so i cant help to much
It can only return data which can be turned to json
and class instances cannot
try document.getElementsByClassName('iva-item-root-G3n7v').length to see if it's getting the right elements
@fringe badge ^
aah you are correct i think in my little puppeteer project i am returning string
hey guys any iranian developers here
plz notify me by sending massage to me or by simply replying to me in here
i would appreciate it
its about a job request (we need a dev)
there you go
Can anyone suggest me any reaction gif api
giphy?
Its not working in embed
ohh you want to generate gifs?
use the right url
you're probably grabbing the site url not the image's
is here have any part to hire people??
I tried that too
what url u tried?
this is gonna break as soon as the site is recompiled
const exampleEmbed = {
title: 'Some title',
image: {
url: 'attachment://https://i.imgur.com/wSTFkRM.png',
},
};
message.channel.send({ embed: exampleEmbed });```
How do i upload an url as image attachment.The actual Code is not working :C
that won't work bruh
your url is wrong
attachment://something.ext refers to sent files
you can't simply use attachment://https://...
https://giphy.com/gifs/anime-girl-toradora-ROF8OQvDmxytW```
How can I get right one?
So how can I get direct URL
Can I get the url from giphy?
you can, but you'll need to find out how
let commandfile = client.commands.get(cmd.slice(prefix.length));
// Cooldown
if(commandfile && commandfile.help.cooldown){
console.log(cooldown)
const getCooldown = commandfile.help.cooldown * 1000;
if(cooldown[commandfile][message.author.id] === undefined){
cooldown[commandfile][message.author.id] = true
setTimeout(async () => {
delete cooldown[commandfile][message.author.id];
}, getCooldown);
} else {
cooldown[commandfile][message.author.id] = true;
return message.react("⏰");
}
};```
Why i have this error: `TypeError: Cannot read property '605371484046884865' of undefined`
what would be the correct way?
which line?
attachment://
https://
http://
^ those are protocols
if(cooldown[commandfile][message.author.id] === undefined){ < here
That with protocol is understandable, but I am really confused :C
So if I have the url https://i.imgur.com/wSTFkRM.png
How do I upload it as an attachment inside an embed,do i have to download it or use the Buffer instead?
use that url
nvm
there are ways to hide the token
you're never supposed to put it directly into code
but that .env is not working now
why?
then figure out why
and i have create a alt account
in there also
it is saying that you cant make .env more
what else are you putting in env?
I mean, inside it
ya i have done all the things possible
i am saying my friend to try that
he hosted my 1 bot
ah thanks for helping me
I think replit moved from .env to environment variables aka secrets
yeah
@gritty lintel ^
ads maybe?
their free tier customers will never upgrade to paid tier
or info selling
No ads on their pages so I'm curious myself
ya
so many children who literally cannot upgrade to a paid tier even if they wanted
they deprecated .env files and switched to a glitch ripoff tab under the settings button to set envireonment variables
well, when something is free then you're the product
yes
they gotta make money somehow
replit is used in schools
Merger, Sale, or Other Asset Transfers. We may disclose and transfer your information to service providers, advisors, potential transactional partners, or other third parties in connection with the consideration, negotiation, or completion of a corporate transaction in which we are acquired by or merged with another company or we sell, liquidate, or transfer all or a portion of our business or assets.
info selling then
that's about asset transfers
Can we change the pfp of a bot? I asked cause i cant change the name of the bot
yes you can change its avatar
i'm making a giveaway command with role requirements. I'm not able to figure out a way to remove the reaction of the users who do not have that role, can anybody please help?
One question
Is there any way for mute a user only for you in discord.js???
Like if i mute a user manually, like the photo
You can change the name too
you're probably on the wrong tab in the developers page
Go to the "Bot" tab
why?
the bot can't hear users anyway unless you make it
someone?
reaction removal normally has an user argument
I can but when i add the bot it shows the old name and in the server new name
can you post a screenshot of the developer page where you changed the name
no no, I want the bot mute users for me, i mean... imagine i am listening music with a bot, and people begin to enter to the voicechannel; well, i want the bot mute all users for me, but i want the bot mute them like if i was who mute them
yes, but how do i get the id of the person who reacted? (i'm using reaction collector)
[i figured this out, sorry for the ping]
umm which region is best to host the bot!?
hi
does anyone know how to make my bot welcome people? with their pfp in a pic
DIscord.js only
what part? the picture part, or the event?
i mean
like a picture of something
and the pfp of people is in the middle
i would use canvas.
how?
ok
lol
but why doesnt that work
these two both give 4 as teh output
also 1 is the first index and 0 means the end of a string or the start (end in this case)
👀 fake scratch smh
mmm
no idea why it would show both as 4 👀 weird
ikr,the first part (which generates the number) always gives the right value and i verified the 2nd part gives the correct substring but apparently combining them recursively just kills it

i did the same thing in python and it works
istg
Eyes hurt reading
School assignment?
nah just my own project
Cuz otherwise you can just do int('00101', base=2), can't you?
yeah i could do that easy, but i cant do that in scratch ripoff
You masochist

😔
Oh God
What's below a masochist
i made sure to use only stuff i can use in scratch but for some reason it doesnt work
A person who merely gave up on themself
you can't because that's client-side
you either mute the user for everyone or don't mute at all
converting my help command to buttons
pain
no idea why discord limits buttons to 5 per row, makes it look really bad in certain screen sizes and amount of buttons
I'm waiting for it to come to JDA
then I'll add an option to use them with my lib
Because Discord
Erwin
slow, trash, inefficeint, unperformant, ram hungry, traash, bad, trash, slow devs, trash, oversimplified, trash
does deiweiej3eir have buttons
it do
a long while now
cuz guess what
even the idiots at d.js had been playing with us for buttons for over a month now
but their 214 devs cant keep up with cake
fuck guess I'm rewriting my bot in dewjededeferf
the one thing i would've liked is permission to add our own color to the buttons label
This feature can be implemented in a day or two, what are d.js devs doing
smoking weed
Waiting for features to pile up so they can release a major version
Instead of releasing minor versions with new features
they're surprisingly easy to implement
welcome to the team
stage channels are still not supported in discord.js stable
superbrain is also coding in detritus
a lot of shit is not supported on djs stable
i forked disqord and implemented them in like two hours (including interactions)
im about to adapt my reaction handler to use reactions instead
buttons*
so i dont have to change the code in any form
buttons can't be used in dms 😔
v13 WiLl bE rElEaSeD wHeN iT's rEaDy
wat
imagine having bots use dms
yeah
discord straight up ignores the components field
my bot uses dms wtf
holy shit, my bot doesnt even respond to dms now

fucking hell
discord™️
i have this
it would be more organized if it was in a dm
but unfortunately
the components field is just ignored in dms
its not just the components field
discord's api is getting cooler updates 
at least thats whats happening to me
just without buttons
maybe it's discord.js' fault?
so right now im stuck with mixing reaction handlers and interaction handlers
for dms i'm using reactions and if a dm fails it falls back to a guild channel where it uses interactions (buttons)
whispers barely audible
use detritusjs
fuck i dont want to support both buttons and reactions
i already removed all the reactions code
can detritus use buttons in dms?
no but you'll still receive the messages lmao
oh wait i set my bot to not respond to dms in dev mode
no response as per usual
Hello, can you help me, why does it appear that the bot is disconnected?
try asking the support server not here
it makes sense that buttons aren't can't be sent in DMs cause they are part of the interactions API like you said, but I think limiting the interactions APIs to guild-only is kinda stupid
about that
so...
make only slash commands guild-only
yeah but looking at the interactions object, the docs imply that interactions are available in dms too
show that blurred pic 
make me, capibara
they do? Oh then it's either a bug or not implemented
make me what? lol
i said "make me", then call you a "capibara"
@vivid fulcrum@cinder patio@quartz kindle calm ur tiddies
😩 but i need the buttons nowwwwwww
god knows when they'll fix it
i love how bots are what drives discord and is keeping the platform alive but yet discord says a big fuck you to bot devs lmfao
lel
im fairly certain this is wrong
we all know is furries and horny teens, thats truly what moves discord
everything is hardcoded lul

011
imagine indexing with 0 prepended
wish version of lady gaga's 911
im gonna pretend i understood that
page 02 is second page. page 011 is the first option inside first page
https://discord.com/developers/docs/interactions/slash-commands#get-guild-application-command-permissions how does this make sense
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
lmfao what
im concerned for tim's mental health now
i mean sure, you could just make objects inside objects
but then the entire thing goes too much to the >>>
discord docs are so fucking inconsistent
They're confusing lol
better than twitch's
no wonder there are hundreds of people constantly fixing them on their github
not wrong, but not right
everything follows snake_case and then the slash command docs follow CamelCase
lol
most of it is skids trying to get free internet points
not actual errors
like indentation error
misppelled words
ye lul
Oh, Pascal Case
GuildApplicationCommandPermissionsTypesInterfaceBecauseTypingsLookAmazingWhenNamedLikeThisBecauseWhyNot


