#development
1 messages · Page 668 of 1
ghghhgfth that works too
Oh I've got some code for people doing lots of pings too, if someone pings more than 3 roles they get sent to detention
Like sometimes you get a troll that's pining every role constantly over and over, I figured a way to punish them for too many pings
then I just added tooManyPings into the spam if chain
However if you mention the same role 4x or the same member 4x it won't work, still fixing that though
Because it's only mapped once I believe
Right
hmm
You can shorten that to message.mentions.roles.size and so on instead of using arrays
that also looks like a solution to repeating last message
I've got a crazy spam filter, I have a stack of each user who is not a trusted member's last 3 messages
hello
Like
const members = message.mentions.members.size;
const roles = message.mentions.roles.size;
if (members >= 4 || roles >= 3) {
blah blah blah
}
So it records the time and the message, if any of the previous 3 messages are identical or the time from the first to the last is less than spam_time_thresh presently set to 7 seconds, it's considered spam and all messages are deleted
@hollow saddle I like that alot actually
I might borrow that idea
It makes code a lot more readable and condensed
And it might solve your problem of the same role being pinged multiple times and being ignored
oh man I think my bot is actually DMing the owner of this server saying it doesn't have permissions.. like that's by design but Imma put a way to turn it off vfdbhv
@sonic peak yeah you better, or you'll have a very angry admin kicking your bot 
yeah fair I'll do it uh in a bit, I'm technically in the hospital rn
Wut
I'm kinda in the hospital because I like, ruptured a spinal disc
and my bot was approved while I was being treated bvhfdbhvf
speed
It's a lot easier to decline than to accept
ye
HTML is not fortay
I'd wait for someone else to help you
I'm not very good at html
sorry
okay 😦
@real helm What are you stuck on I know basic html
I need 2 thing xd
Encypt my html code
I have a basic encrypt but is very easy to decrypt
and I need a button to copy text
If I do the button I don't need crypt my code
Like passwords? Or...
xD
I'm kinda confused lol, so you want to encrypt your login system?
you want to encrypt the whole page?
I have a script
that it generate X thing
In a list
If you go to the font code do you see all the items that the bots generate
Or
If i do a copy button, I don't need encrypt
Like copy text
stuff?
like, use the DOM methods to copy the text to clipboard
copyToClipBoard?
here's a ref i found https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
document.execCommand("copy") on the active element i guess
@stone dust I go to do it
you need to select it first
Yes
selectAllChildren() on the element
The cody to copy is a result from a script
what
you could modify the value of a desired form element
and then copy from that in this case
there's probably a cleaner way to do that
just Google JS DOM methods
you cant hide something on clientside, if you absolutely need people to not be able to extract something from your source code, you need to never send it in the first place, ie: keep it in the server
guys why is there a limit for editing a message it does not make any sense
it is considered as a post
how am i supposed to go around this problem
You can't bypass ratelimits
It does make sense for editing messages to be ratelimited too
Don't?
lol this is so frustrating
Update it every 2 seconds or don't at all, depending on the purpose of the edits
it is a timer
Wait what
You can't edit a msg every second?

no it is a post action
same as sending a mesage
the api does not care
The default ratelimit for that is 5/5s 

so you can update one message every second
5/5s
Speaking of which does any of you know how many servers does your bot need to be in to ask Discord for a decrease in rate limits
Just wondering
Technically you can but it's not suggested, Static
well i do not want my bot getting deleted
lol
allright ill work around that problem
@earnest phoenix hi buddy
@earnest phoenix well mine has 2300
but im not sure 🤔
I read somewhere that you could ask them to increase the amount of actions you could do
But your bot needed to be in a lot of servers
you can't really ask
they'll get in touch with you when you cross 100k guilds for sharding reasons and they'll increase the amount of IDENTIFY you can send in a day
huge bots like rythm have their ratelimits adjusted
yeah, you're looking at a absolute minimum of 100k guilds for discord to even read your request
let alone do something
probably
Alright thx yall
Can you find out what guilds your bot is in?
why couldn't you
I mean how cool would it be to get your bot right now to use a for loop and create a few thousand invites to all the guilds that bot is in and then go check them all out, meet new people?
Not cool at all
that is probably against the tos
So they're allowed to use your bot, but you're not allowed to know their guild that's using your bot?
that's not what you said
Don't see an issue if it's a one time invite just to see your bot on that server for "development inspection"
that's the discord equivalent of "i come from planetminecraft, give me op so i can review the server"

developer inspection should be done by analyzing your bot's logs, accessing guild information, etc
not by going in there uninvited
still, you can easily see whats going on in a server without needing to go there
But your bot was invited onto their server and you're that bot's creator
and your bot is public
you give them permission to add it
if you want to collect information of any kind, you require the user's consent, same as with websites that use cookies, etc
gdpr compliant 
So you're telling me my spam filter that MUST collect the last 3 messages a user sent to determine if it is spam or not is actually unwarranted information collection?
no, because you're not storing them
not long term storage for data analysis at least
No the last three messages a user sent are being stored on file, but anything older than 3 messages is over-written
plus when they add it, they agree to that
but they didnt agree to let you come in anytime
unless you write it in your bot description or something
"by using this bot you agree to let the bot owner join your server at any time for development inspection"
lmao
cause everyone would totally agree to that
They probably would actually because they would want their server numbers to grow
lol true
I wouldn't want some rando joining my servers
depends on the servers i guess
well if it's a small invite only server with your close friends probably not
yeah exactlyt
you're allowed to store information about messages, because when they're being sent, they're sent out to everyone who has permissions to read the messages in the channel and they're aware of that, however you're not allowed to farm information about users without their consent because they aren't aware it is happening, by GDPR you're also required to delete the data if your bot is no longer in the guild
there are people who would do anything to get more members of any kind for some reason
likely advertising marketing
but anyway why do you want to join their servers? just to talk to them?
Yeah just look through an equivalent of a yellow pages of discord servers and go war dialing
lmao
it's about https://discordbots.org
LOL
i-
I mean it could go either way, either people say yeah this bot's really cool it helps you get more members and you get more people using your bot
or
it could go badly wrong and people go murrr who are these randoms joining my discord.
About 2 years ago there was this discord bot phone and you could ring up random discords and ask for an invite
then you got there and it was like 20 bots, 3 users and a dead server.
You mean yggdrasil
Problem is once your bot gets a lot of subs, you get scared to go out of your comfort zone in case your entire reputation implodes. Me I've got a bot on 2 servers and I'm just toying with ideas right now.
Yeah once your bot gets going, better to stick to guidelines
im a web developer
Do you help me? @quartz kindle
with what?
I need to do a copy button
Does it only have to copy the string in one box?
select from where?
@real helm what tim said
What do i change this to so it shows shards? async def updateservers(): while True: async with aiohttp.ClientSession() as s: data = { 'server_count': len(bot.guilds) } await s.post( 'https://discordbots.org/api/bots/605712924635430912/stats', json=data, headers={ 'Authorization': dbl_token }) await asyncio.sleep(1800)
discord.py btw
if you set server_count as an array, it works as shards
if you're posting individually from each shard, then set a shard id
<script>document.write("Stock accounts:" + cuentas.length + "");</script>
How I put it in the right?
wat
@real helm i dont understand what you are trying to do
what would the command do
It will tell if someone upvote our bot
then yes
We can or not
show if voted -> yes
vote -> no
this is #development not #commands
Jeez way to go man he had already apologized and everything
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
``` ?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
relative path vs absolute path
../../folder/whatever.png
One message removed from a suspended account.
D:\UnderCord\Images\beab5bda41d2d6c74d806725320dd06d.png absolute
Images\beab5bda41d2d6c74d806725320dd06d.png relative to D:\UnderCord
One message removed from a suspended account.
@sage bobcat ^^
module.exports.run = async (bot, message, args) => {
if(args[0] === "lol") {
const embed = new Discord.RichEmbed()
.setAuthor("test")
.addField("test", "test")
message.channel.send(embed)
}
const embed = new Discord.RichEmbed()
.setAuthor("test")
.addField("some other test", "test")
message.channel.send(embed)
}
module.exports.help = {
name: "test",
aliases: []
}```
when i type `n.test lol` it sends both embeds
because you always send the second
and only send the first if the first argument is lol
oh thx
someone did python music bot? im trying and its just not working
const { RichEmbed } = require("discord.js");
const botconfig =require("../../config.json")
module.exports = {
config: {
name: "hack",
Description: "banne einen User von dem Server ",
category: "Moderation",
accessableby: "Moderation",
aliases: [""]
},
run: async (bot, message, args) => {
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("Du hast keine rechte diesen command auszuführen")
if(!message.author.id == botconfig.OwnerID) return message.channel.send("an diesen command wird momentan fertig gestellt!")
if(!args[0]) return message.channel.send(`Bitte gebe eine UserID an!`)
let bannedMember = await bot.fetchUser(args[0])
.catch(() => {
return message.channel.send("Das ist keine UserID !")
});
if(!bannedMember) return message.channel.send("Bitte gebe eine Richtige UserID an!")
// message.channel.send("SAS")
let nopermE = new RichEmbed()
.setTitle("Nicht genügend Rechte")
.setDescription("Bitte gebe dem Bot Die rechte: \`KICK_MEMBERS\` damit dieser command funktioniert")
.setFooter("Tip: am besten du gibst mir Adminstrator")
.setColor("RED")
.setTimestamp();
if (!message.guild.me.hasPermission("KICK_MEMBERS")) return message.channel.send(nopermE)
try{
message.guild.ban(bannedMember, `MOD: ${message.author.tag}`)
}catch(e){
message.channel.send("Etwas ist schief gelaufen...")
console.error(e)
return;
}if(error)
message.channel.send(`${bannedMember} wurde gebannt`)
```when i m doing a return in the catch
the messge `message.channel.send(`${bannedMember} wurde gebannt`)`
get executed how can i fix that
🤔
What
Remove the return
And put a else statement
} else {
} ```
idk if its what are you trying to do
One message removed from a suspended account.
One message removed from a suspended account.
Yea?
Not sure what this error meaning, but i think it's when the bot can't have acces to the db in the correct time
One message removed from a suspended account.
add a await
One message removed from a suspended account.
let Goldtoadd = await goldtoadd?
One message removed from a suspended account.
One message removed from a suspended account.
Oh yeah
Goldtoadd = Math.ceil(Math.random() * 50)
did you intend that to be lowercase goldtoadd
One message removed from a suspended account.
let Goldtoadd;
One message removed from a suspended account.
One message removed from a suspended account.
you're currently assigning a value to Goldtoadd, then initializing it as a let later, causing an error
let Goldtoadd;
//code here
Goldtoadd = Math.ceil(Math.random() * 50)
also you didnt define goldtoadd
One message removed from a suspended account.
don't redefine Goldtoadd
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("Du hast keine rechte diesen command auszuführen")
if(!message.author.id == botconfig.OwnerID) return message.channel.send("an diesen command wird momentan fertig gestellt!")
if(!args[0]) return message.channel.send(`Bitte gebe eine UserID an!`)
let bannedMember = await bot.fetchUser(args[0])
.catch(() => {
return message.channel.send("Das ist keine UserID !")
});
if(!bannedMember) return message.channel.send("Bitte gebe eine Richtige UserID an!")
let nopermE = new RichEmbed()
.setTitle("Nicht genügend Rechte")
.setDescription("Bitte gebe dem Bot Die rechte: \`KICK_MEMBERS\` damit dieser command funktioniert")
.setFooter("Tip: am besten du gibst mir Adminstrator")
.setColor("RED")
.setTimestamp();
if (!message.guild.me.hasPermission("KICK_MEMBERS")) return message.channel.send(nopermE)
try{
message.guild.ban(bannedMember, `MOD: ${message.author.tag}`)
} catch(e){
message.channel.send("Hmm etwas ist schief gelaufen")
}else {
message.channel.send(`${bannedMember} wurde gebannt`)
}
}}
@earnest phoenix that dosen´t work D:
what you can do:
let a = 0;
a = 1;
what you can't do:
a = 1;
let a = 0;
@peak quail what do you want exactly
i want that the bot sends a message when there is no err
@earnest phoenix
if(!message.author.id == botconfig.OwnerID) return message.channel.send("an diesen command wird momentan fertig gestellt!")
if(!args[0]) return message.channel.send(`Bitte gebe eine UserID an!`)
let bannedMember = await bot.fetchUser(args[0])
.catch(() => {
return message.channel.send("Das ist keine UserID !")
});
if(!bannedMember) return message.channel.send("Bitte gebe eine Richtige UserID an!")
let nopermE = new RichEmbed()
.setTitle("Nicht genügend Rechte")
.setDescription("Bitte gebe dem Bot Die rechte: \`KICK_MEMBERS\` damit dieser command funktioniert")
.setFooter("Tip: am besten du gibst mir Adminstrator")
.setColor("RED")
.setTimestamp();
if (!message.guild.me.hasPermission("KICK_MEMBERS")) return message.channel.send(nopermE)
try{
message.guild.ban(bannedMember, `MOD: ${message.author.tag}`)
} catch(e){
message.channel.send("Hmm etwas ist schief gelaufen")
}
message.channel.send(`${bannedMember} wurde gebannt`)
}}```
Try without else
One message removed from a suspended account.
gold.gold
the issue is ban being async
Gold not defined
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@earnest phoenix look the last message is wrong
it should only sent one message
(the first)
So delete it?
@sage bobcat js const variable = something; // cannot be edited; let variable = something; // can be edited
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you set it as a const?
One message removed from a suspended account.
One message removed from a suspended account.
where did you set it?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
did you set it maybe somewhere else in the code?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
pong
One message removed from a suspended account.
you cant change a const
One message removed from a suspended account.
You can change a let but not a const
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I think you want to do if (gold) instead
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
well it depends on what you're actually trying to do
bc rn nothing is making sense
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you cant run gold.save() when gold is null
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
notice the closing }
One message removed from a suspended account.
One message removed from a suspended account.
further reading: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
One message removed from a suspended account.
One message removed from a suspended account.
where
One message removed from a suspended account.
The variable is literally not used
One message removed from a suspended account.
newGold1 = Goldtoadd + gold
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
add message.channel.send outside of the if statement
aliases is undefined
^
One message removed from a suspended account.
wait waht?
One message removed from a suspended account.
outside of the if statement
One message removed from a suspended account.
not in it
One message removed from a suspended account.
@stray garnet there is nothing in the aliases array
what does that mean ? Ik im stupod
so when you run the forEach its trying to do whatever it does on something that doesn't exist
oh
One message removed from a suspended account.
One message removed from a suspended account.
@topaz fjord but aliases exist
One message removed from a suspended account.
It doesn't exist for your object help
One message removed from a suspended account.
maybe you misspelled it?
One message removed from a suspended account.
wouldn't you want it to return newGold1 for new accounts
since it shows the gold that they just got
One message removed from a suspended account.
Just newGold1
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
put return in front of both message.channel.send
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
and turn newGold1 = Goldtoadd + gold to newGold1 = Goldtoadd
One message removed from a suspended account.
if it's still doing it after the document was created
log gold
It may be that you have multiple documents in the db
One message removed from a suspended account.
log gold
One message removed from a suspended account.
One message removed from a suspended account.
exactly after you fetch it
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
before the if statement
So my brain doesn't seem to be functioning correctly. I've tried to think of many ways of doing this one thing but it's not happening.
I'd like to have separate prefixes for different categories but I just don't know how.
discord.js@12.0.0-dev
Use a database
For?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.

One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
can I change the colour scheme of my bot page?
One message removed from a suspended account.
Are you sure you'd like to violate ToS?
One message removed from a suspended account.
One message removed from a suspended account.
Don't log messages unless it's critical for the functioning of your bot
critical means critical, btw
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
oh ok
One message removed from a suspended account.
One message removed from a suspended account.
Maybe push it to a webhook lol
I know like 2 ppl who manually check their VPS logs on a regular basis
One message removed from a suspended account.
Is there a document in mongodb
One message removed from a suspended account.
One message removed from a suspended account.
Is there one now
One message removed from a suspended account.
One message removed from a suspended account.
Don't
One message removed from a suspended account.
change find one into .findOne({ ... }, (err, adventure) => { ...})
One message removed from a suspended account.
One message removed from a suspended account.
create a new one that is ```js
Gold.findOne({ ... }, (err, adventure) => { ... })
and in that second curly braces log err
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
wait
One message removed from a suspended account.
why is logging command execution against tos?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
ohh lol
logging messages aka deletes/updates is a feature in my bot but locked to the discord servers its enabled in
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yeah i log commands
One message removed from a suspended account.
so i know whos abusing.
One message removed from a suspended account.
One message removed from a suspended account.
Hiya, does anyone have an idea as to why the Gaius bot isn't responding to some commands... I would guess it has something to do wither permissions, but I've given it all. I got the bot online, but can't find a control panel like Dyno and other bots have.
It's code: 245675252821000193
Who can tell me how I do in discord.py that gives a role on support server to a voter and sende a message?
You mean like proper case? (Case Like This With Capitals)
Peace_Of_CakeToday at 9:12 PM
Hiya, does anyone have an idea as to why the Gaius bot isn't responding to some commands... I would guess it has something to do wither permissions, but I've given it all. I got the bot online, but can't find a control panel like Dyno and other bots have.
It's code: 245675252821000193
this isn't a support server for that bot, go to the owner and report whatever's happening, that's an id by the way
There's no built-in function, but you could create one yourself.
how so
what is your code
Lunabit, you could just create a function which takes a string, make the first letter of a word capital, stuff like that
```message.channel.send(\``${roles.map(r => • ${r.name}\n${message.member.roles.map(r => r.name)} Members).join(\n), { split: true }}````)
still got some things tot do but i'll after i get this correct
at some point I have to clean up my message handling over all
@smoky mica you've misplaced your brace
right now, it's ( {string, {options}} ), when it should be ( {string}, {options} )
@earnest phoenix thank you
what's the difference between split(" "); and split(/ +/); ?
one is a string passed by reference, the other is regex
@earnest phoenix is this not correct?
``` message.channel.send(\``${roles.map(r => • ${r.name}\n${message.member.roles.map(r => r.name)} Members).join(\n)}, ${{ split: true }}````)
no
${{ split: true }} why are you doing this
it's not a string, it's an object
because you're still passing it in the string
ergo you're typing it in the string itself as the message content
Hey
Your bot @invalid-user was declined. Reason: Your bot's presence changes every few seconds which is considered API abuse, please limit the amount of times your bot changes it's status to a more reasonable amount, for example every 12 seconds.
how do I limit 12 seconds
5 x 700 is 3.5 seconds
hmm
clearer?
i make 35| 000 ?
no
lol
nailed it
ofc if you insist you can do 35000 * 1
some people like the identity rule
Can I ask for something else than discord bot ?
How am I suppose to do ?
https://stackoverflow.com/questions/20021457/playing-mp3-song-on-python
I don't understand
Someone can help me ?
for a discord bot?
if so, google "discord.py music bot" and you'll see tons of examples/tutorials
@midnight vine ```sh
pip install pygame``````python
from pygame import mixer # Load the required library
mixer.init()
mixer.music.load('PATH/TO/SONG')
mixer.music.play()```
Why does my JSON file keep resetting when I restart my bot/update my code?
Restart command:
message.channel.send({embed: {
color: client.color,
title: "Bot restarting...",
timestamp: new Date(),
footer: {
text: client.version,
icon_url: client.user.avatarURL
}
}}).then(client.destroy().then(process.exit()))
@opaque eagle I can write pip install pygame in a line of visual studio code? I don't understand much about feature installations
@floral bloom what do you mean by your json keeps resetting? All I know is you should pass a function for <Promise>.then method.
Also <Client>.destroy returns void/undefined, so it wouldn't work
I have a currency system. collect adds money to the users balance. When I restart the bot, the user's currency is back at 0.
Source code where you save it?
You mean, how I save the JSON file?
Yeah, I also recommend you don't use json to read/write for storage. The file can be corrupted
client.save = fs.writeFile("./data.json", JSON.stringify(client.data), (err) => console.error);
client.save; // Save JSON
I think I may go to Enmap.
or a database
^^ You should use a database. Maybe experiment to see why it's not saving, are you getting any error? Maybe it's taking a bit to save
Nope, no errors.... it just resets...
will this work as a message collector? https://hasteb.in/alavujew.js
No, but I fixed it.
i'd do return new Promise(...).finally(() => delete this.activeCollectors[...])
huh, ok, never heard of finally
@inner jewel it specifically triggers when it's resolved i'm guessing?
Promise.resolve(1).then(() => { cleanup }, () => { cleanup }) always resolves to the return of the cleanup functions
same with reject
(.then(a,b) is the same as .then(a).catch(b) where a doesn't throw)
the rest looks fine
so even though i'm using resolve(message) it's not going to end with the actual message?
if you use finally it will
if you used then/catch you'd have to do js .then(message => { delete ...; return message }).catch(e => { delete ...; throw e })
Eris isn't a planet!
Eris is a planet
It's a dwarf planet!
the "-" between Main Class and the function may be case sensitive
Sorry, what?
use the application and shadowJar plugins
I got both already
planet zebes imo
I think you should get sponsorship from companies and post random adverts on people's servers who use your bot and you take commission from the adverts.
Maybe send an email to the users and say you are "revising your bot policy"
I mean you'll have to code it well because if the bot just spams adverts every 5 seconds it's going to annoy the heck out of everybody
tbh any bot that attempts to advertise in mine or any server im admin/mod in gets a free ban
this isn't about you though
but i can see where you're coming from, posting random ads in the middle of a chat would probably annoy most mods/admins
json is the easiest
Your bot @invalid-user was declined. Reason: Your bot has a server list command, m!ailemiz, which is considered a privacy breach as it lists all the servers your bot is in. Please either limit this to the bot owner (you), or make it opt-in, or simply delete it.
i deleted
Command
Nice
cute iara
reapply?
can someone kill me
@earnest phoenix If you have trouble DM a moderator. This isn't the appropriate channel for that. Also, fix the reason listed and if you're confused DM the responsible moderator. You can find it by searching the bot's id in ( #mod-logs ).
It doesn't work
I don't understand
How am I suppose to do ?
https://stackoverflow.com/questions/20021457/playing-mp3-song-on-python
So you have to type the first line into the console first
youre supposed to do pip install in the terminal to install it
In the terminal it's an error
did you use cd to change the directory?
?
I think I have to download a pip thing but it doesn't work neither
I managed to do that yesterday but I do not know how
you don't know how to open cmd?
import subprocess
subprocess.call("start", shell=True)
Ok, it's open
If it's that
windows key + r then type cmd and press enter
It's that no ?
'pip' is not recognized as an internal command
or external, an executable program or a batch file.
Rip you don't have python in path
Try python -m pip install pygame
You already have python installed
Why It doesn't work so ?
Wait on Windows it's py
No it's not?
Was by default for me
Both work for me
python -m pip install pygame doesn't work neither :/
Reinstall Python, add it to PATH and/or pip in addition to that is possible
The terminal don't recognize python
Try py
py work
I just want can add music when I open a big program
But I need pygame
And pip
But i Can't download pip for a reason
Python comes with pip
Mate
Soo, I nothing understand
py -m pip
how to upload images with discord richembed?, & like the highlighed things (Today thingy)
setImage() setTimestamp I think
is anyone here who can help to setup own bot?!
if you have any specific question, just ask
can ya show me the example of setTimestamp & setImage()?, i'm having trouble 😕
what did you try?
@steady geode .setImage('../directory/oliy.png')
Remove a dot if the embed it's in your main file
@spiral moss More specific
i can give in private
Ok
@earnest phoenix am i right 
Yes
And under just add .setTimestamp()
you can't provide local paths to setImage
instead, use attachFile to attach the file to the embed and then use setImage("attachment://filename.extension")
though, if its a command that's going to be continously used, you might want to save on bandwith usage and yes upload it to imgur
you're wrong again
uhm
you only use attachment:// for when you want to include images that you're uploading from a local path
also that imgur link is not the direct link to the image
don't spoonfeed
oh sht ur right
Not really spoon-feeding
guide them to the solution if you want to help
k
https://
yeah forgot to mention that xd
xd
how do the images also go into the richembed? (bad at english so i used googol translate :'v)
yes :'v
get the first item out of that, if it exists it will return https://discord.js.org/#/docs/main/stable/class/Attachment which has a url property, you can pass that directly to setImage
e.g setImage(attachment.url)
you want to take an image a user sent and put it in an embed?
@earnest phoenix do you mean this? new Discord.Attachment(filename)
or this.attachments = new Collection();
how to do an prefix with an space? like: nl help
I'm completely lost, I'm trying to activate a music option in my program, I was advised pygame but it must be installed via pip, But for now the only thing that worked is py -m pip, What am I supposed to do now?
I do not understand
py -m pip install pygame
google it
I'm doing this
provide an absolute path
How ?
'C:\Users[user_name]\Music\all.mp3' Like this @midnight vine
I don't know, it might be a problem with your Python IDE
no it isn't lol
i'm pretty sure it will assume that you're targeting a file in the same location as the py file if you don't provide an absolute path
yea, still error
what is your code
It's bureau
but it's the same error
Just to read music...
There is no other way ?@earnest phoenix
isnt using \ in a string an escape what if u replace all \ to /
https://i.hibiki.dev/zgfhm2Gozk5.png
https://i.hibiki.dev/N10VesQQx.png
or triple quote it
can also \\
I just deleted all the way to keep all.mp3 and it's an other error
so, I convert mp3 in wav and we'll see
if you put your music file in the same folder as your program, then you can use a relative path, ie: ...Sound("all.mp3")
if you put your music file in a different folder, then you must specify in which folder the program should look for that file
^
why are my servers undefined what should i do to define them
How do i delete a photo once posted in chat
I've tried to delete it. Apparently I'm doing something wrong
https://hasteb.in your code


lEgs
One message removed from a suspended account.
how to do an prefix like this: nl help?
check for it.
@earnest phoenix with .wav everything is perfect, thanks a lot !
like when you need to get messages every second
Yes, discord has rate limits on all requests
like i mean would i get banned or what if make a GET request every second
cause my bot works like that
depends on the route
discord has per route rate limits
ie: the post limit on the channels route is 5 per 5 seconds
i dont know about get, but you can enable the rate limit headers to get information about them
REST:
POST Message | 5/5s | per-channel
DELETE Message | 5/1s | per-channel
PUT/DELETE Reaction | 1/0.25s | per-channel
PATCH Member | 10/10s | per-guild
PATCH Member Nick | 1/1s | per-guild
PATCH Username | 2/3600s | per-account
|All Requests| | 50/1s | per-account
WS:
Gateway Connect | 1/5s | per-account
Presence Update | 5/60s | per-session
|All Sent Messages| | 120/60s | per-session```
Ratelimits

The developer docs specifically say to use the rate limit header returned as they change.
if it really is per-channel then all of my ideas are saved
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Read this, it doesnt actually say anything about per channel, it does say per account and per route, however
Wait
I read wrong, my apologies 
/channels/123 & /channels/321 are different routes, each counts as its own ratelimit, but what the docs say is regardless what HTTP method you use it counts as a request and its fed into the same ratelimit (e.g GET to get the channel info and DELETE to delete the channel are both fed into the same ratelimit)
i hope that makes sense
there are some global ratelimits though that ignore the route e.g how many messages you can send in a second/minute (i forgot which one)
yeah my bad, same routes, different parameters
i.e. they'd share a rate limit
but like @mossy vine you or the lib you're using shall parse the headers
Additionally, rate limits take into account major parameters in the URL.
/channels/123/messages and /channels/456/messages are different buckets
they have different limits
but eg get /channels/123/messages and patch /channels/123 are the same bucket
so they share the limit
iirc
yes
so random question
naturally I log every guildCreate and guildDelete event, but the numbers just aren't matching up. Is that normal?
for example: yesterday - removed (now in 52)
today - added (now in 56)
okay no nvm I just checked the logs, the console log is working but the message sent to my channel is not, different issue entirely
in discord.js when using message.channel.send('text'); is it better to always await it? like always do await message.channel.send('text'); or does it depend on the situation?
You don't need to unless you want to do something with that message after sending
oh okay thanks
I always do it to send messages in order, but I dont think it has any actual affect unless you want to do what timo said, just a habbit for me
all right yall
so in djs how do i murder a specific shard given that i have its id
i'm testing how my db handles shard status updates and need to like kill a shard and respawn it, but that's just backgorund information
Are you using shardingmanager?
yeah
there's only ShardUtil#respawnAll
just disconnecting the shard, not respawning it
inbuilt
possibly
but that will do it for all shards
need a good, committed developer to help me with my bot. Well basically "fixing it" or "cleaning" it up. To make commands more efficient, deprecation-less, and errorless
dm me or mention me
One message removed from a suspended account.
what language
If (client.shard.id === the_id) client.destroy() @valid frigate
ah thank you
@pearl grotto what language
discord.js
i personally spawn shards manually because I don't like the ShardingManager
at least not discord.js anyway
using websockets and a small event handler
One message removed from a suspended account.
One message removed from a suspended account.
well in your command handler
put some console.log statements
yes
that's not a d.js thing though
that's basic js

One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
oh yeah ravy could you point me in the right direction of how to manage shards if i spawn them manually
epic
very epic
yw ^°^
have someone a discord.js restart code to restart the bot
kill the process
or use a process manager
os services ftw
@tough wyvern bot.destroy() and then login
How can I change the little triangles at the end of the tags on my bot page. I can't find them in the css
Little triangles?
Can somebody help me out here please? Anybody know why I suddenly started getting this error? The first pic shows the error, second shows what it normally outputs
https://plexi-development.sucks-hairy-balls.xyz/122kl.png
https://plexi-development.sucks-hairy-balls.xyz/urutv.png
One message removed from a suspended account.
damn it
I think it's when the ratelimit has been hit @earnest phoenix
your slow
you can change them @sage bobcat
One message removed from a suspended account.
One message removed from a suspended account.
you can change everything
just right click on a tag and try inspect element to get the html code
@winged thorn i know how to change them
you need to find the element through inspect element and target the ::after tag
I found that but I tried background-color and background and neither changed the color
the property you're looking for is border-left
https://github.com/advaith1/dbl-css @winged thorn
CSS for customizing bot pages on discordbots.org. Contribute to advaith1/dbl-css development by creating an account on GitHub.
look that
Just here
i think
¯_(ツ)_/¯
copy whatever you need to and refresh the page
its probably an issue with xsrf tokens
yeah that was it
this is a lotta css my god
Anyone know if it's possible to remove the white border thing from the bot icon
Photoshop
on the bot page
I managed to remove one of the borders from another aspect but this one stumped me
Is there a way that in Discord.JS I can check to see if x users role is higher than y users role
Like both their highest roles
And then compare them. Example is Owner is above Moderator, so moderator can't ban the owner role
Ok coolio. Thanks 😃

TypeError: message.member.highestRole.comparePositonTo is not a function @winged thorn
if(message.member.highestRole.comparePositonTo(member.highestRole) == 0) {
return message.reply("Sorry but you can't ban that person!");
}
I just installed it a few days ago
How do I check?




