#development
1 messages · Page 587 of 1
yes
that's what I gave
except it's the average of that meaning it's the ping
average ping*
Does anyone know if there is a quiz bot that uses reactions to submit answers?
I would really love to honestly see how it works so I can fix up my own bot

ye my boy andy posted his bot token by accident bc it was on his clipboard 😂
it's fine tho it wasn't anything big luckily
1)glitch
2)phone
3)tiny text
Three things you can't use to code
ew
XD
people will more than likely not offer help with free hosting
get a proper vps and the issue would probably go away, which at this point isnt even expensive, 2 euros a month on scaleway
@earnest phoenix no
I just click pic in my phone
Lol
Me
Yea
Why
Can you suggest me 2-5 euros vps
Scaleway
free for a year
@pine leaf you're a mad man if you suggest that to a new person in server development.
@pallid zinc if you're a student you can get the student github package and claim 100 dollars on DigitalOcean
@earnest phoenix ?
DigitalOcean unlike AWS EC2 has a 100% guarrantee that you pay the exact number you see
Yugnut, EC2 has hundreds of settings
It can go from being 5 euros to several hundred
I suppose, if you just read the docs/ forum posts/ the vast wealth of knowledge online concerning EC2 then even a new dev shouldn’t have any issues
Have you ever used it?
I currently use it
For the purpose of a bot?
Yes
I also use it daily and I don't see how AWS EC2 > Ubuntu Scaleway/DO server
Less configs, easier to start
Search "Amazon AWS overcharge"
To be fair I haven’t used those, I was just suggesting based off of what I use.
I’m pretty sure you can setup billing alarms for that though
Well the best option is to havr all the settings right
But digitalocean requires 0 settings
For enterprise level Amazon EC2 is AMAZING
I work as a software developer and I love EC2, S3, cloudwatch, ES and so on at worn
Work*
But using it at home I don't reccomend
(Afk)
Hey man, like I said I was making recommendations on what I was familiar with, I’ll know better than to do that in the future I guess
Or literally check pins, use any search bar or consult my grandmother to do a simole google search for you.
#development is not google
@pine leaf no no, I'm not trying to tell you did something wrong. I'm just trying to be informative.
@earnest phoenix I’m so bad at reading people, sorry about that, I’m sure it being 1:30am where I’m at has something to do with it as well.
At any rate I’m off to dream land, sleep tight fellas
Haha good night man
I know my doubt might be silly, but could anyone help me to make an "entry order" in javascript? The same as the Vortex bot ... Who can help me, please, mark me.
Uh what
there is a boxshadow that boxshadow wont remove >:c
if anyones avail to help fix this white bar nonsense
dm me
@earnest phoenix css #bot-details-page .bot-img { box-shadow: none !important }
Add that

That's what I use on https://discordbots.org/bot/moosic
Inspect it in devtools
those are the only two classes
or ids
that are involved
both of which i remove box shadows
Did you use the id and the class together or separately
seperately
Lol k
byotiful

simply delicios
Hello everyone
A lot of bot websites offers a way to connect via the bot to discord to access the user’s username, guilds etc
Can you explain to me how to do that ?
It's a discord application
You know how you access the application panel to access your bots? It's that same process I'm pretty sure, you just don't make it into a boy
Bot*
How would you set up voting rewards 🤔
I also want to now
Set a webserver up running and put its public IP in the webhook URL field on your bot's Edit page
Have you read the error?
it's the correct directory
hello, who have discord control panel for bots?
@earnest phoenix what do you mean?
Web based?
And is it for users or for the developer itself?
How can i import a custom font?
like Lobster
const applyText = (canvas, text) => {
const ctx = canvas.getContext('2d');
let fontSize = 70;
do {
ctx.font = `${fontSize -= 10}px font`;
} while (ctx.measureText(text).width > canvas.width - 300);
return ctx.font;
};
@chrome olive I'm not quite sure what lobster is but I usually include a ttf file
If I want Arial in Linux for my C# code I include the file name of the font
Yes. TTF file
no
What's lobster?
ye
Yeah you can download that
Here you go if youd want the git for it
and how i can import it?
What language are you using?
Are you applying the text to an image?
yes
So image manipulation. Okay.
ctx.fonttype or smth? I'm not sure what image manipulation library you'e using
I do for example
ctx.font = "Arial";
Wher you choose the font type, just put Lobster in the directory
I want to unban (banned) user with Discord.py. I can ban mentioned user with this code.
await client.ban(message.server.get_member(message.mentions[0].id),delete_message_days=0)
However i can't unban (banned) mentioned user. Because message.mentions returns empty.
await client.unban(server, client.get_user_info(message.mentions[0].id))
How can I solve this problem?
@loud tinsel use discord id?
I mean you can't really mention someone who is banned
Yes
That is correct because message.mentions returns cached Member/User object
And since the bot shares no server with the mentioned user, .mention is an empty list
Ok, thanks.
You should either be getting an ID from the mention or entering ID directly
As far as I remember, you could make that API request a discord.Object instance instead because get_user_info afaik is heavily rate-limited
i'll do as you said
(When creating an instance of discord.Object, the only argument (probably kwarg in this case) you will need is an ID)
I have another question.
I want to delete messages. I'm using this code. But I think this isn't a good way. Is there another better way?
async for msg in client.logs_from(message.channel,limit=90):
await client.delete_message(msg)
Docs are nice
guys
Purging on message would run you into rate limits
how do i get bot developer
@earnest phoenix Make a bot and submit it on the site + get thru the verify stage
Hello,
I've added a ticket bot, but for keeping it on I need to reconnect to the MySQL database if the connection has been closed. Does anyone have an idea?
re open the file
The language is: Java
Library: JDA (Java Discord API)
oh
i only know python
@quartz barn you want to keep a mysql connection alive?
I'm confused
@amber fractal I coded my bot with on_message function. Are the commands better?
Yeah, without changing the wait_timeout in the my.cnf
@spark comet.command()
async def a():
Can anyone help
@quartz barn you should only keep it open till the query is done
I need help
Have a connection string, execute the query with the string and close the connection
My bot crashes when I use results command
How in earth am i supposed to know what you mean
Wait
Yeah that's a start
Sorry for perfect English
Please show a picture
I am on mobile so wait
how can i get ram usage of my bot (not pc) in python?
why people use python
@valid linden what do you mean ram usage of the bot (not pc) the amount of ram used by the bot
yeah ram used by bot
def memory_usage_psutil():
import psutil, os
pid = os.getpid()
ps = psutil.Process(pid=pid)
return (ps.memory_info().vms)```
let me try
It doesn't return it in mb or kb, but in bits, If i'm right
It utilizes psutil
If you want it to return in kilobytes you will have to divide it by 8000
In mb it will be 8,000,000
Hope I helped 😃
i divided it to 8000000 but it returned a different value than task manager if i didnt do anything wrong
Try by 8000 so it will be in kb
I doubt it returns in bits
Bytes is usually what those kind of things return
discordjs is better
what
Hell nah
how is that relevant
Ye ^^
Yeah but discordjs is easy
Wtf
Seriously why are you shilling for discordjs
How is that relevant here at all
Easy isn't always best, they can basically do the same thing with a different syntax
https://www.quora.com/How-do-I-measure-memory-used-by-a-program-in-Python-3 the user vivek posted 3 answers
You are just one search away from excellent answers to this question. Really, try once. For example: memory_profiler 0.41 Total memory used by Python process? How do I profile memory usage in Python?
Can you tell me how to program an autorole in the jda? And if someone wants to help me with @hushed zodiac:)
Break down the problem into the 3 parts -- listen for member joins, determine which role to add, and add the role to the member
I'm sure you're able to fgiure out how to listen for member joins -- it's the same logic as listening for new messages
@hushed zodiac
is this a good example of a ping command
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
if (message.content.startsWith(prefix + 'ping')) {
message.channel.send({embed: {
color: 0x2ed32e,
fields: [{
name: "Pong",
value: "My Ping: " + Math.round(client.ping) + ' ms'
}
],
}
})
}})```
So I've been trying to get a purge command to work, that allowas you to filter by attachments, users or both, if that makes sense. But so far the logs I've taken have come back with collection as empty after the filters
} else if (!type && user){
message.channel.fetchMessages({limit:amount}).then(messages => {
const userMessages = messages.filter(m => m.author.id === user)
callback(userMessages)
})
} else if (type && !user){
message.channel.fetchMessages({limit:amount}).then(messages => {
let typeMessages
if (type == 'image' || type == 'img'){
typeMessages = messages.filter(m => m.attachments > 0)
} else if (type == 'bot'){
typeMessages = messages.filter(m => m.author.bot)
}
console.log(typeMessages)
callback(typeMessages)
})
} else if (type && user){
message.channel.fetchMessages({limit:amount}).then(messages => {
let specMessages
if (type == 'image' || type == 'img'){
specMessages = messages.filter(m => m.attachments.size > 0)
specMessages = specMessages.filter(m => m.author.id === user)
} else if (type == 'bot'){
specMessages = messages.filter(m => m.author.bot)
specMessages = specMessages.filter(m => m.author.id === user)
}
callback(specMessages)
})
}```
Sorry for the length, but thats the important part of the function
Been testing on just the type or user section seperately so far

Haven't been able to find anything for the right thing to use for filtering the messages that contain attachments
The one you're using only checks for api ping
else if (command == 'ping') {
// Finds ping by checking when the 'Ping?' message is sent against when the command message was sent
const m = await message.channel.send('Ping?');
m.edit(`Pong! Latency is ${m.createdTimestamp - message.createdTimestamp}ms. API Latency is ${Math.round(bot.ping)}ms`);
}```
This is what I'm using for mine, found it on stackoverflow I believe
whats the error
.
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
oh god dont tell me you tried to just copypaste that code
i didnt
i already has something like that
but i changed it
message.channel.send({embed: {
color: 0x2ed32e,
fields: [{
name: "Pong",
value: Math.round(client.ping) + ' ms'
}
],
}
})
}})```
is this good?
better to use == instead of ===
whats your reasoning for that
== actually worked for one
lack of javascript knowledge
message.content is a string, nothing wrong with comparing types aswell
if you're suggesting code changes based on "it having worked somewhere else before" you should read into what you are suggesting and reconsider
Well I know the difference between them, == has worked though, when I tried it with strict comp it wouldn't reply, and haven't found a use for it since
i use === and it works
== is not strict, === is
how about writing a command handler and doing it properly instead of doing the same garbage with a different syntax 
@restive halo === means equal to + type to
Ik
If "command" is a string
It should work
And since it's being compared as a string I don't see a reason for it to not work
Neither did I but for some reason it wouldn't
Got the purge command almost fully working woo
I mean then you did something wrong. This is coding basics. === doesn't have errors
hi
how do u do a webhook for get votes ?
@earnest phoenix a webhook works the way that instead of you asking the server
"Anything new?" Constantly, it will just inform you when it has something new
You need a web server for this
If you have a web server you can make something like a PHP code to get the body of each request sent to that link and handle it.
- User votes
- Website sends request to your link with nessecary information
- Your server handles the information
In the case of PHP, you could use php://input which gets all the input of the request in JSON format, possibly needed for encoding (correct me if I'm wrong)
@restive halo dont spoonfeed
@junior summit dont ask for code and expect to be spoonfed
Aight sorry, little tired after today
rule 7
ok
I'm trying to use message.awaitReactions
for some reason it gives me the error message UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): ReferenceError: collected is not defined
I am trying to do it as an async function but is it normal for collected to not be defined?
define collected then
the thing is that it is supposed to be defined already
const awaitReactions = async (msg, m, options, filter) => {
const {min, max, page, limit} = options;
m.awaitReactions(filter, {max: 1, time: limit, errors: ['time'] })
.then(async(collected => {
const reaction = collected.first();
console.log(reaction);
if (reaction.emoji.name == '🇦') {
await removeReaction(m, msg, '🇦');
// change the page
page = page + 1;
await m.edit({ embed: pages[page] });
console.log("Going 1");
};
// restart the listener
awaitReactions(msg, m, options, filter);
}).catch(() => {
console.log("OOPSIE-DAISIE, SOMETHING WENT WRONG, ", collected);
}));
};
That's the part which is not getting the collected parameter
hmm
as much as I can understand from the discord.js documentation, awaitReactions is the lite version of ReactionCollector
which has a parameter of collected
all the await reactions function does it wait for a said amount of reactions then stop when the max limit was reached and i’m pretty sure that’s the same way the reaction collector works. that said try indenting the code inside the then function callback
oh
ic now
what's happening there?
you have a unnecessary (
it’s fine, i’ve been there before
That's what I get for coding in notepad++ 
I use a actual ide
np
can someone here help me with eris-lavalink
i got this error
Cannot read property 'guildid' of undefined
dm if you can help so i can show you the code
Hey
I would recommend you posting your question, with adaquete details and descriptions of what you want and what's currently happening on StackOverflow
or maybe just ask the creator of the article
Does anyone know how I can recreate a amazon alexa device that can listen for a keyword, then if the message gets executed
Using rapsberry pi 3 b+ headphone jack
This is not stack overflow
So.. on the Discordbots.org, How do I get my bot to show how many servers are using it?
You must use the DBL api https://discordbots.org/api/docs @plain timber
Spice up your Discord experience with our diverse range of Discord bots
questions about the api go in #topgg-api btw
thanks you and my bad
No problem :)
I have created a bot 100% dedicated to the news, any suggestions of what I could add? The news is divided into categories and regions. Is with Discord.js
Can it play instruments?
@sharp sky fortnite
Hey
hey
spammable
wdym?
what if someone does new a bunch of times and spams it
But wont that also spam you?
or wherever the ticket goes
wait
I think I dont understand
what it does
lmao
a question urbansearch should be in NSFW channel?
😂
@earnest phoenix urban is a nsfw command yes
ok thx
@amber fractal
-blacklist is also a thing 😂
But yeah, I'm tring to replace Tickety (Because it has been offline for a few times now)
Hello, how host to discord bot???
sell your soul
to a hosting company and put it up there
or you can run it locally really just whatever you want to do
@dusky marsh
- Get a hosting company that support hosting in your coding language
- Buy a raspberry pi or a mini computer and connect it to your internet. Then set it up so the bot works & is online.
- Try getting a sponser for your bot (Like have with RoyaleTickets)
Oi I know I was hoping someone who has seen me before would get a laugh outta my question lmao, thanks for attempting to help though 
I use heroku
Hosting company
A vps would support it in practically any language, "discord bot hosters" are a joke
Yeye
I saw one yesterday and asked them about their services and they were like "yeah actually we don't host discord bots", when they were advertising it like okay buddy, I'll just stick with ovh
The shit is joke101
I use ovh aswell
Yeh, they're pretty reliable as far as I'm concerned, I wanna check out digital ocean tho
Maybe I'll use one to host my website and then compare em that way 
Idk
someone here was paying for 13€ "discord bot hosting" a month but it was infact a 512mb shared vps lol
@dusky marsh I used both
DO > OVH
And DO has AMAZING support
They refunded me for like 6 months of hosting service because I didnt understand something
(It still charges while its offline without me noticing)
Finna make my own discord bot hosting service and overcharge for it
Ovh is probably better if you're on a budget
Do has better support and reliability
A while ago it was memed to death
Apparently its owned by someone here or a friend of someone here
Who needs support if you know what you're doing tho 
I've used ovh support once asking how I could upgrade because I couldnt see a button right in front of me
Lmao
I had to ask glitch way back when how to private my project cause I couldn't use common sense and click a button
Smh how far we've come,,,not very far
Hey
Ny bot got rejected for a reason called everyone can dm... THEY CANT SEE THESE
@sharp star sorry i thought it was a dev question. dm the mod that declined your bot, its in #mod-logs
Ok
can someone show me why this is return undefined with eris?
const modlog = message.channel.guild.channels.find(channel => channel.name === guildEntry.logchannel.channel);
console.log('LOG CHANNEL: ' + modlog);```
it gives me this error
at Client.<anonymous> (C:\Users\chill\Desktop\chill\discord-bot\bot.js:109:44)
at Client.emit (events.js:189:13)
at MessageCreateHandler.handle (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
at WebSocket.onMessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:189:13)
at Receiver._receiver.onmessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\ws\lib\websocket.js:137:47)
at Receiver.dataMessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\ws\lib\receiver.js:409:14)
(node:6052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6052) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
😦
Hey I made my bot run on Heroku now to be online 24/7, do I really need to write the whole bot metadata again?
After it was declined
Tip save your long description.
@junior summit you need to tell us what you're trying to do, just the error isnt enough in your case
But with what I have, the thing before a user property is undefined
man like @sharp star coding on mobile
android too nice
@arctic mountain yes cause i did
I could use some help
Does my bot have to be in this DBL server in order for it to show how many servers it's in?
I have added the
client.on('ready', () => {
setInterval(() => {
dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
}, 1800000);```
code and it still doesn't show how many servers it is in on the DBL website like the other bots I see on there
(Yes I have installed the dblapi.js npm stuff and put the my bots dbl token in my code aswell and const DBL = require("dblapi.js"); into my code aswell...I am confused
Your bot being in this server just shows whether or not it's online I think
Hello, I have a problem my lag music feature on my bot, sometimes the music stops and lag for a few tens seconds
Do you have a solution ?
if you define the module as DBL you're supposed to access it with DBL aswell instead of dbl
How are ya hosting @lofty hamlet
On my VPS
Ihhh the basic plan looks like it could support a music bot in at least a few servers
Tho I can't guage just how intensive music bot hosting is as I've not done it yet, I've just heard it is
Compared to other things at least
Oh yeah yeah yeah if you have that many you need more than the basic plan for a music bot
im using it cause its free
is it bad in any way?
Heroku is so bad
It just isn't good for anything other than a barebones bot
not even currency dbs?
If your bot has to do much more than just responding, you're better off paying like 2 bucks for a cheap vps
No
oof
Ye
@marble needle that didn't work either
@dusky marsh
const DBL = require("dblapi.js");
const dbl = new DBL('My DBL Token Here', client);
dbl.getStats("537126219095736351").then(stats => {
console.log(stats) // {"server_count":2,"shards":[]}
});
dbl.getBot("537126219095736351").then(bot => {
console.log(bot.username) // "RaidX"
});
dbl.getUser("254148960510279683").then(user => {
console.log(user.username) // "Ori"
});
// Optional events
dbl.on('posted', () => {
console.log('Server count posted!');
})
dbl.on('error', e => {
console.log(`Oops! ${e}`);
});
client.on("error", () => {});
console.log(' Bot Is Online')
console.log('╚[════════════]╝')
console.log('')
client.on('ready', () => {
setInterval(() => {
DBL.postStats(client.guilds.size, client.shards.Id, client.shards.total);
}, 1800000);
console.log('Logged in as: ' + client.user.username + ' - (' + client.user.id + ')');
client.user.setPresence({ game: {name: "-vote | -help | -invite", type: 0 } });
client.user.setStatus("Online");
});```
My DBL token is there in the code, just not here in the post
So it's just not posting?
No, My bot comes online and works fine. I go to the DBL website and refresh the page over and over again but still nothing
Ah I see, I think it's limited to update every fifteen minutes or something
Then again
That's what you got your time at yeh?
I don't remember, but does setInterval run the first time? Or does it do the time the first time as well and then run
nvm seeing your code you should change it back to dbl.postStats since you defined the dbl client itself as dbl
I haven't been coding for like a week so I'm forgetting a tad lmao
I don't know as I am still new to this kind of stuff
and I did @marble needle
I will wait like 15 min, refresh and see what happens
setInterval doesnt execute until the timer ran through once
Yup
ok, I'll wait and let you guys know if something happened
Kk
thanks
is there a way to see when people add your bot to there server in cosole?
yes
that second part idk
like with what library
there's an event for your client joining a server
and also voting
Hi i have an other problem why this line does not work ? : if (achievement1.includes(".")) return message.channel.send("Erreur :Croix: : `Vous devez rentrer des chiffres ou un nombre entiés`")
achievement1 is equal:
var achievement1 = Number(args.join(""))```
What's the number function
you have to use the includes method on a string or an array
and you are using it on an integer
You could just round it, or convert it to a string, which may not be good practice
Yep
^
TypeError: DBL.postStats is not a function
at Timeout.setInterval [as _onTimeout] (C:\Users\Ori\OneDrive\Desktop\RaidX\RaidX.js:72:17)
at ontimeout (timers.js:424:11)
at tryOnTimeout (timers.js:288:5)
at listOnTimeout (timers.js:251:5)
at Timer.processTimers (timers.js:211:10)
C:\Users\Ori\OneDrive\Desktop\RaidX>pause
Press any key to continue . . .```
This is what I am getting now
dbl.postStats @jaunty stump
Yes, you can use that
C:\Users\Ori\OneDrive\Desktop\RaidX\RaidX.js:72 dbl.postStats(client.guilds.size, client.shards.id, client.shards.total);
^
TypeError: Cannot read property 'id' of undefined at Timeout.setInterval [as _onTimeout] (C:\Users\Ori\OneDrive\Desktop\RaidX\RaidX.js:72:61)
at ontimeout (timers.js:424:11)
at tryOnTimeout (timers.js:288:5)
at listOnTimeout (timers.js:251:5)
at Timer.processTimers (timers.js:211:10)
C:\Users\Ori\OneDrive\Desktop\RaidX>pause
Press any key to continue . . .```
This upsets me. I will try just the client.guilds.size this time
the spacing on discord is bad
It says it can't read property "id" of undefined
the only place where you try and read a property called id is client.shards.id
yes, that's why This upsets me. I will try just the client.guilds.size this time
oh isee
which would fix
Now to wait 15min again
is the ready event dispatched after all guilds have loaded?
or is there a way to check if all the guilds have loaded
It's safe to say that if the bot is ready, then you can do what you want with the client
The ready event is fird after all guilds are loaded
But guilds also have an individual availability check, that you can use to see if a guild is available, in case of outages for example
So like the amount of servers it's in?
Also what language
Ah, will have to wait for someone who's used that before :p
im here, what's up
what's your code
len(bot.guilds) is what will get an int value representing the length of the list
is that what you need?
hm
np
that was also basic python
maybe read up the docs a bit
message.guild.me.voiceChannel.connect();
should i use that to connect
to a channe;
Yes
k
lol

Hey
If u dont care about locatiob
Pulseheberg offers cheapest price to pefformance i know of
Ovh if u want a na host
Ok
Until You add some music features*
No music
YouTube
if your code is copy paste
and you dont understand why it doesnt work
thats a first
because you cant create a bot if you dont know how to debug basic issues
I already have my own bot in my server
yes but do it have any code in it?
running a simple bot is the most basic
and you said you are in iphone
so it means your bot has no server
you need to pay monthly for a server or use glitch but I dont recommend glitch or any other free hosting service because in my opinion, why even bother to create a bot that you cant sustain
but if you want to push through despite of my warnings you can either use python or javascript
both are easy for beginners
having isuses with sqlite
You do realise we can’t help you if you don’t tell us what the issue is
I don't want to install
?
@pallid zinc thats not really helping...
send detailed information, your code, and the error message if there is one
how'd i fix this probleme
what did you run?
p tags and h1 tags are highlighted, but h2 aren't
At least not the first one
Just the first headline tag is higlighted
Could someone help me?
On the website
<style>
h1 {
color: 0x4C4A48
}
h2 {
color: 0x4C4A48
}
p {
color: 0x4C4A48
}
li {
color: 0x4C4A48
}
</style>
<html>
<h1>MemberCounter</h1>
<p>MemberCounter is a simple Discord Bot that shows the current amount of members on a guild as its nickname on this guild.</p>
<h2>Best way to use it</h2>
<p>The best way to use it is to set MemberCounters role at top of all roles or at least over the Member role or whatever you have. Then set it as hoisted an you will right away see how many members your server has.</p>
<h1>Commands</h2>
<ul>
<li><code>%help</code>: Shows a help how to correctly set MemberCounter up and a list of all commands.</li>
<li><code>%update</code>: When you believe MemberCounters nickname isn't showing the correct amount of member because of a downtime or whatever, use this command to update its nickname.</li>
<li><code>%invite</code>: Shows the link to invite me to your server and the invite link to my support server.</li>
<li><code>%stats</code>: Shows the bots stats on discordbots.org.</li>
<li><code>%config</code>: Configure the bot to your wishes.</li>
</ul>
<h2>Links</h2>
<ul>
<li>MemberCounters invite: https://discordapp.com/api/oauth2/authorize?client_id=448845486515027970&permissions=67110912&scope=bot</li>
<li>MemberCounters official support discord server: bla bla</li>
</ul>
</html>```
Should still work I remember it happening on my bots desc too @whole harness
@ruby dust c'mere
hm?
the frick does this mean
you are trying to .lower the command object?
i never tried to .lower() any commands
lemme get the full error
File "/home/skullbite/.local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 64, in wrapped
ret = await coro(*args, **kwargs)
File "/home/skullbite/yoshi/cogs/owner.py", line 79, in reload
self.yosh.load_extension("cogs." + cog_name)
File "/home/skullbite/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 618, in load_extension
lib.setup(self)
File "/home/skullbite/yoshi/cogs/info.py", line 100, in setup
yosh.add_cog(Info(yosh))
File "/home/skullbite/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 545, in add_cog
cog = cog._inject(self)
File "/home/skullbite/.local/lib/python3.6/site-packages/discord/ext/commands/cog.py", line 330, in _inject
bot.remove_command(to_undo)
File "/home/skullbite/.local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 986, in remove_command
command = self.all_commands.pop(name, None)
File "/home/skullbite/.local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 102, in pop
return super().pop(k.lower(), default)
AttributeError: 'Command' object has no attribute 'lower'
bot.remove_command(to_undo) what's this?
is to_undo a command?
i don't control its argument
the only things I see here are either reload or setup
Using .lower() on Command won't cast that method on Command.name magically
@commands.command(aliases=["re"])
@commands.check(checks.is_owner)
async def reload(self, ctx, cog_name):
try:
loaded = discord.Embed(color=0x3bc600)
loaded.set_author(name=f"Successfully reloaded {cog_name}", icon_url="https://cdn.discordapp.com/emojis/488791107170205707.png?v=1")
self.yosh.unload_extension("cogs." + cog_name)
self.yosh.load_extension("cogs." + cog_name)
await ctx.send(embed=loaded)
except Exception as e:
failed = discord.Embed(description=f"**Reason:**\n\`\`\`diff\n- {e}\`\`\`", color=0xc61e00)
failed.set_author(name=f"Failed to reload {cog_name}", icon_url="https://cdn.discordapp.com/emojis/488791367590608915.png?v=1")
await ctx.send(embed=failed)
wew
jesus
i give up
Well, that's a shame
concat + formatting 
so
after removing the custom help
thinking that was the issue
ClientException
Command info is already registered.
Couldn't load info
i think im being toyed with.
Btw it's supposed to be is_owner() in the check
Unless you actually made it a property instead
Is it a method/function in checks file
yes
turns out theres two info commands 
one in my music cog..
maybe if i remove it it'll load properly
Maybe
mmmmmaaaybe.
well
my info cog loaded
but my lavalink refuses to connect
i'll deal with that later
Is there a way to get rid of this message? I've hooked up the commands to some big function, but it still says this if you ping it or do it in dm even if the command is correct. Unknown command. Use keplerbot! help or @The Kepler Bot#1179 help to view the list of all commands.
I had to change the commandPrefix to something else but the default was kb!
If you need to look at the code (you probably do) The github link is here :/ https://github.com/keplerteddy/kepler-bot/blob/master/bot.js
Thanks for helping if you do
Didnt see it in that file, perhaps its in another file?
I've checked everywhere
Its a commando thing
Check the commando docs, there should be an option somewhere to disable default command and unknown command warnings
But from what i can see, youre not even using commando
So just remove it lul
Okay
Oh wow it worked
I'm a dummy :D
Also the part where the bot could trigger the kepler bot has been fixed! :D
@jagged birch https://canary.discordapp.com/channels/264445053596991498/272764566411149314/555721043898269700 doesn't work
Maybe you have to have a head and body tag in the rightful positions
I'll try and test out your code
Works fine as far as I know
It's probably just a glitch
However I'd use the <a href="link here">text goes in here</a> tag so people can just click the link and go there.
Can’t some give the code for discord.py for server count thing?
Ik how get server count lol
Oh what
HTTP request with aiohttp to an API endpoint with Authorization and Content-Type headers
I would've suggested dblpy if it hadn't been outdated
Yeah, it kinda is
Oof
It works, though
I did this from the example
Hey is it possible I could get what he asked but its in discord.js? (not on the website)
Like it would display the amount of servers The Kepler Bot is in.
@naive gull https://discordpy.readthedocs.io/en/rewrite/api.html#discord.Client.is_ready I doubt that await self.bot.is_ready() works
From here https://discordbots.org/api/docs#pylib
is_ready() only returns the bot's state
aka if it's ready, returns True, else False
It doesn't wait until all of your guilds are loaded
Seems like the bot is on four other servers that I am not on :D
Wut
Were you talking to me?
I think
I'll take a look
thanks
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/555753794923790337 just a link to my website?
I don't have one
@whole harness what problem are you having?
It doesnt matter if its highlighted or not, if it works it works. Also, remove the <html> tags
Its the long description in the website, right?
Yes
The html tag is useless there because this is not a new page, its injected into an existing page
What do I set the Webhook url to in the discordbots.org edit page?
Same with your css, you have to adapt it to dbls existing css
Your bots public url/ip address
Is that correct?
<style>
h1 {
color: 0x4C4A48
}
h2 {
color: 0x4C4A48
}
p {
color: 0x4C4A48
}
li {
color: 0x4C4A48
}
</style>
<h1>MemberCounter</h1>
<p>MemberCounter is a simple Discord Bot that shows the current amount of members on a guild as its nickname on this guild.</p>
<h2>Best way to use it</h2>
<p>The best way to use it is to set MemberCounters role at top of all roles or at least over the Member role or whatever you have. Then set it as hoisted an you will right away see how many members your server has.</p>
<h1>Commands</h2>
<ul>
<li><code>%help</code>: Shows a help how to correctly set MemberCounter up and a list of all commands.</li>
<li><code>%update</code>: When you believe MemberCounters nickname isn't showing the correct amount of member because of a downtime or whatever, use this command to update its nickname.</li>
<li><code>%invite</code>: Shows the link to invite MemberCounter to your server and the invite link to MemberCounters support server.</li>
<li><code>%stats</code>: Shows the bots stats on discordbots.org.</li>
<li><code>%config</code>: Configure the bot to your wishes.</li>
</ul>
<h2>Links</h2>
<ul>
<li>MemberCounters invite: https://discordapp.com/api/oauth2/authorize?client_id=blaBla&permissions=67110912&scope=bot</li>
<li>MemberCounters official support discord server: https://discord.gg/blaBla</li>
</ul>```
I dont know if css supports 0x color codes. Css uses hexadecimal colors like this: #4c4a48
Also, as i said, your css should be adapted to dbls page
How to do that?
It is in a div
So basically div in div in div and so on
I just wanted to change that because h2 headers are as white as the bg
I put #content in front of it but still no success
Whats the existing css as it appears in the inspector?
The css that makes it white
Nope, the previous one
Huh?
Its using an !important
Oh when I change to white theme everything is alright
Then only way to change it is to equalize its specificity
So you should use .content h2
And use !important
I g2g bye
Hello, how can I rank this? : I can not do it:
{"488467274878156831":{"XP":640,"Level":9,"Dresseurs":6},"484463405961314308":{"XP":0,"Level":1,"Dresseurs":0},"493025435769372682":{"XP":970,"Level":16,"Dresseurs":174},"486217297162141697":{"XP":20,"Level":1,"Dresseurs":1},"467020854673408030":{"XP":30,"Level":1,"Dresseurs":0},"410799046957989888":{"XP":0,"Level":1,"Dresseurs":1},"110373943822540800":{"XP":0,"Level":1,"Dresseurs":3},"455334173906042896":{"XP":0,"Level":1,"Dresseurs":0},"454933217666007052":{"XP":0,"Level":1,"Dresseurs":0},"465658764838699024":{"XP":0,"Level":1,"Dresseurs":0},"478933804313083905":{"XP":0,"Level":1,"Dresseurs":0},"493431224308858910":{"XP":0,"Level":1,"Dresseurs":0},"385843081280225292":{"XP":0,"Level":1,"Dresseurs":0},"434377041832443915":{"XP":0,"Level":1,"Dresseurs":0},"487935513861292033":{"XP":0,"Level":1,"Dresseurs":0},"416387066201374722":{"XP":0,"Level":1,"Dresseurs":0},"480808248879087657":{"XP":0,"Level":1,"Dresseurs":0},"333949691962195969":{"XP":0,"Level":1,"Dresseurs":0},"394164554847748096":{"XP":0,"Level":1,"Dresseurs":0},"463739847765524491":{"XP":0,"Level":1,"Dresseurs":1},"264445053596991498":{"XP":0,"Level":1,"Dresseurs":0},"478359319864410123":{"XP":30,"Level":1,"Dresseurs":2},"481017497009520670":{"XP":0,"Level":1,"Dresseurs":0},"465919746567700481":{"XP":0,"Level":1,"Dresseurs":1},"480384189900783616":{"XP":0,"Level":1,"Dresseurs":0},"493509406567432202":{"XP":0,"Level":1,"Dresseurs":0},"455828803499851799":{"XP":0,"Level":1,"Dresseurs":0},"387304030390583296":{"XP":0,"Level":1,"Dresseurs":0},"427409812112932864":{"XP":0,"Level":1,"Dresseurs":0},"493558216051916810":{"XP":0,"Level":1,"Dresseurs":0},"493185545783214081":{"XP":0,"Level":1,"Dresseurs":0}}
Objects cant be sorted, you have to create an array from it
You can use Object.keys() or Object.entries() for example
botumus.autheniticatus()
botumus.onlinus()
Google "How to sort objects javascript"
"Message #development" != "Search Google or type a URL"
Yep yep
how to make a prefix
for your discord bot
im using the embed and commando
in nodejs
i have like this
How do I make database I have no clue. Im using visual studio code and programming in nodejs
You can use a google spreadsheet as a simple database
here is a simple tutorial on how to make one yourself
Wait wtf
that's python, no. he said he was using nodejs
using spreadsheets as a database 
I can't wait for the day that someone comes in here asking for help on an Excel spreadsheet db
I would be able to die without regrets if I saw that
I can't find anything on the interaction limit or anything in a Excel spreadsheet, but definitely gotta imagine it runs like shit
I just noticed the person who asked a question was using commando smh we should've been suggesting the spreadsheets this whole time 
i meane
if you store to cache and write every so often
it would run fine until you got a bigger data set
it would slowly get slower and slower to write
what about read speed though?
i mean you read once on startup
and store to cache
and thats it
i would imagine
ah, if you use it like that yeah
then it wont matter much, since you can always offset writes to background, since you dont need to wait for them in most cases
its the same way i use json
i never write to json anymore
before i knew about databases i sed json files as database
and oh my god
the stability and such
bad choice
now if i have anything that changes i store on mongodb
and static values like settings tokens etc etc
i store in json
my bot still runs on json, and its stable as a rock
but im gonna switch to sqlite when i can
I have no idea why but my bot is restarting every 15-30 minutes
are you using free hosting
I'm using Glitch.com
there's your problem
And using pingerbot to ping it every 5 minutes
don't use free hosting and the problem'll go away
"pingerbot"
i dont expect much from cheapskaters lol
Wait not pingerbot
uptimerobot
Also this keeps happening
It's done that for a while even without Glitch.com hosting
i told you, don't use free hosting, it's probably the root of your problem
It's even done that when I selfhosted it
unstable connection
usually means your internet is not strong enough to handle the websocket connection so it breaks
I use discord.py
i converted my bot to work in cogs, but now when i run commands, i get an error saying that ctx is required argument that is missing
here is my code
class AdminCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
Have you classed it
(commands.Cog) is new in the recent update
['chat', 'music', 'channel', 'member'] cannot be loaded. [module 'discord.ext.commands' has no attribute 'Cog']
have you done it to the other cogs also?
yes
just did, now i get the error 4 times
update discord.py rewrite
with pip?
ye
do you know the command?
pip install -U https://github.com/Rapptz/discord.py/archive/rewrite.zip#egg=discord.py[voice]
@unreal rampart
Thanks
tell me if it updated
it is updating rn
okay dokie
Hmm I'll try that
wait
Like what Tim said
what
no access to c:\
wat
Could not install packages due to an EnvironmentError
same
same
['chat', 'music', 'channel', 'member'] cannot be loaded. [module 'discord' has no attribute 'Channel']
but now only twice
i was not on rewrite i think
believe i have
class AdminCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
bot.remove_command("help")
@commands.command()
@commands.has_permissions(kick_members=True)
async def kick(self, ctx, userName: discord.User):
await ctx.guild.kick(userName)
embed = discord.Embed(title= "Kicked Successfully!", description= f'{userName.mention} was kicked successfully!'
, color = 0xFFFFF)
await ctx.send(embed = embed)
This is an example
is yours like this
this is in a cog called "admin"
no, cause i need discrod.Server and discord.Channel for some commands
bot.add_roles doesnt work either
beofre when i would do (ctx, channel: discord.Channel) f.ex what would i have to do now?
Does anyone know if the sqlite3 node module has support for row_number? Im finna be pissed if it dont
cause if it does, i sure cant figure it out
my daily command isnt working =[
@client.command(pass_context=True)
@commands.cooldown(1, 86400, BucketType.user)
async def daily(ctx):
users = json.load(open('currency.json', 'r'))
users[ctx.message.author.id]['money'] += 100
with open('currency.json', 'w') as f:
json.dump(users, f)
await client.say("You recived 100 E-Coins :ECoin:")```
anyone know why?
That's python
...
Why are you opening a file twice
Try json.loads instead
ok
I also suggest doing your stuff under that context manager instead
r+ will be read and write mode
@slender thistle what do you want me to replace it with





