#development
1 messages · Page 522 of 1
not just one item in the file
i just realised that, it was in wrong place
this is it now
const Discord = require('discord.js')
const footer = require('../settings/config.json')
exports.run = async(client, message, args) => {
client.on('guildCreate', () => {
async (client, guild) => {
const invite = await guild.channels.find(c => c.type !== "category" && c.position === 0).createInvite({
maxAge: 0
});
let joinEmbed = new Discord.RichEmbed()
.setTitle("Bot joined server!")
.setThumbnail(guild.iconURL)
.addField("Server Name:"+ guild.name)
.addField("Server ID:" + guild.id)
.addField("Server Owner:" + guild.owner)
.setFooter(footer)
.setTimestamp()
client.channel.get('513768341366636547').send(joinEmbed);
}
})
};
```
and it still does not work
rave
can you help me
i did
@client.event
async def on_message(message):
if message.author.bot:
return
so it doesnt respond to bots but what else do i do so it does respond to bots
client, guild wont even work
it will never run
what should it be like then?
this?
const Discord = require('discord.js')
const footer = require('../settings/config.json')
exports.run = async(client, message, args, guild) => {
client.on('guildCreate', () => {
const invite = await guild.channels.find(c => c.type !== "category" && c.position === 0).createInvite({
maxAge: 0
});
let joinEmbed = new Discord.RichEmbed()
.setTitle("Bot joined server!")
.setThumbnail(guild.iconURL)
.addField("Server Name:"+ guild.name)
.addField("Server ID:" + guild.id)
.addField("Server Owner:" + guild.owner)
.setFooter(footer)
.setTimestamp()
client.channel.get('513768341366636547').send(joinEmbed);
}
};
const Discord = require('discord.js')
const footer = require('../settings/config.json')
exports.run = async(client, message, args) => {
client.on('guildCreate', (guild) => {
const invite = await guild.channels.find(c => c.type !== "category" && c.position === 0).createInvite({
maxAge: 0
});
let joinEmbed = new Discord.RichEmbed()
.setTitle("Bot joined server!")
.setThumbnail(guild.iconURL)
.addField("Server Name:"+ guild.name)
.addField("Server ID:" + guild.id)
.addField("Server Owner:" + guild.owner)
.setFooter(footer)
.setTimestamp()
client.channel.get('513768341366636547').send(joinEmbed);
})
};
ok
guildCreate gives the parameter guild
d.js will basically think client is ur guild
in the previous code you're taking guild out of nowhere
ok, and can i remove the await in the const invite since it gives error
any errors?
i meant in the console...
also why are you putting your event in exports.run
i know u meant in console
whenever you call the file it will keep creating more event listeners
i know
look, dont worry about that, it is not the error, im concentrating on the error rn
I will worry because it's the stupidest thing I've ever seen
well, tell me about it after you give me support for the error
well
you're not giving enough information
- Check if the channel exists
- check if the event is actually running
hi dream
console.log('working') at the top of the event to make sure its running
i know
Yeah
ok, so its not running the event 4 some reason
are you removing and adding the bot to the guild
yes
try putting the event in your main file
(node:1987) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'get' of undefined
ok now client is defined so "client.channel.get()" should work
or is it channels
channels
.channel isnt a thing
ok
look at the docs ffs
rtfd pls
Hello node.js peeps, Sequelize noob here...```js
// ./Assets/sequelize.js
const Sequelize = require("sequelize");
module.exports = new Sequelize("testdb", "hello", "goodbye", {
dialect: "sqlite",
logging: false,
storage: "testdb.sqlite3"
});
// ./Models/tags.js
const Sequelize = require("sequelize");
module.exports = require("../Assets/sequelize").define("tags", {
name: { type: Sequelize.STRING, unique: true },
content: Sequelize.TEXT,
guildID: Sequelize.INTEGER,
userID: Sequelize.INTEGER
});
// ./Commands/tags/add.js
const Tags = require("../../Models/tags");
const tag = await Tags.findOne({ where: { name, guildId: message.guild.id } });
if (tag) return this.client.commands.get("edit").run(message, { name, content });
await Tags.create({
name, content,
guildID: message.guild.id,
userID: message.author.id
});``````bash
SequelizeDatabaseError: SQLITE_ERROR: no such table: tags```
would this work
if(client.user.me.hasPermission("INSTANT_INVITES")) return console.log("Bot does not have invite perms on this server");
no
Client.Message doesn't exist
it would be client.guild
it would be someReferenceToTheGuild.me.hasPermission("whatever")
^^^^^
if its inside a guildCreate event then i wont need to do the client.guild.get().me
you dont
guild.me returns GuildMember
and use the properties and methods stated here to see if you have perms
So I think for my error, I have to run Tags.sync() somewhere, but idk where to put it.
docs exist for a reason
now why wont this work
const Discord = require('discord.js')
const footer = require('../settings/config.json')
exports.run = (client, message, args) => {
client.on('guildCreate', async (guild) => {
if(client.guild.me.hasPermission("INSTANT_INVITES")) return console.log("Bot does not have invite perms on this server");
const invite = await guild.channels.find(c => c.type !== "category" && c.position === 0).createInvite({
maxAge: 0
});
let joinEmbed = new Discord.RichEmbed()
.setTitle("Bot joined server!")
.setThumbnail(guild.iconURL)
.addField("Server Name:"+ guild.name)
.addField("Server ID:" + guild.id)
.addField("Server Owner:" + guild.owner)
.setFooter(footer)
.setTimestamp()
client.channels.get('513768341366636547').send(joinEmbed);
})
};
doesnt log anything either, but i know it runs
of course it would run
because that if statement says
"if i have this perm"
return
and you dont need client.guild.me
it didnt even do that
translation client.guild.me won't work
guild.me returns the bot as a GuildMember
client.guild.me dioesnt exist
READ
THE
FUCKING
DOCS
then why did you put client.guild.me
if you know
you're literally proving yourself wrong half the time
ignore my stupidity
It's very hard to do since you do the same fucking thing
what the fuck
finally got my pi to host
and im guessing INSTANT_INVITES wont work, because it just said its not a perm, and i cant find the correct one on docs
maybe if you read the docs
https://owo.oooooooooooooo.ooo/i/p9d7.png use this also
who the fuck knows
@tight heath https://media.turtle-bot.com/f/mYHl2.png
oh okay
pointed it out
el mao
was told to ignore
its their mem leak that will happen
¯_(ツ)_/¯
are you able to make a bot in C?
me or a C coder
Anyone idc
aka yes it is possible, but not for me
im still setting up my pi
but for the love of god atleast use C# for that
sadly
hai
ok so
mmhey
did you not do insert_one yet
oh ok
How to create link in embed using discord.py?
Thank you, I'll try that
Anyone here using snekfetch in NodeJS to fetch someone's avatar?
As an image?
correct
What lib?
Discord.JS
Doesn't d.js has avatar as a property
yes
or is it just avatarurl
<user>.displayAvatarURL
avatarurl, avatar is ID
what
Oh it's just an id
no
Yeah you'll have to make a request for the actually image
why do you need to fetch it with snekfetch
To get the actual image.
Don't use snekfetch it's depreciated
oof
for what purpose
Create a new image
Yeah
whatever you're trying to do, I'm sure they accept a url in some capacity
loadImage accepts a url
@tight heath Nadeko is in C#
thank
superagent pls
it's twice as fast
better end user experience
also rather use
canvas-constructor
it's muchos cleaner
superagent is twice as fast as node-fetch?
yes
atleast the 4.0
which I benchmarked
idk about 3.x
http.request GET request x 14,176 ops/sec ±7.08% (64 runs sampled)
http.request POST request x 17,465 ops/sec ±9.97% (68 runs sampled)
superagent GET request x 7,778 ops/sec ±11.02% (58 runs sampled)
superagent POST request x 9,754 ops/sec ±8.94% (72 runs sampled)
snekfetch GET request x 6,656 ops/sec ±10.64% (60 runs sampled)
snekfetch POST request x 6,274 ops/sec ±7.05% (63 runs sampled)
node-fetch GET request x 5,327 ops/sec ±13.20% (60 runs sampled)
node-fetch POST request x 4,960 ops/sec ±11.07% (55 runs sampled)
axios GET request x 3,307 ops/sec ±12.19% (65 runs sampled)
axios POST request x 3,483 ops/sec ±11.82% (64 runs sampled)
Request GET request x 2,784 ops/sec ±7.77% (58 runs sampled)
Request POST request x 4,103 ops/sec ±16.06% (67 runs sampled)
got GET request x 2,223 ops/sec ±4.62% (70 runs sampled)
got POST request x 2,509 ops/sec ±3.51% (74 runs sampled)
@olive finch
similar syntax to snek
Why not http?
because syntax is pain
I guess but if he wants performance
@tight heath What did you use to benchmark?
benchmark
literally
http.request({ path: '/test', host: HOST }, (res) => {
res.resume().on('end', () => defer.resolve());
}).end();
@zealous veldt believe me you don't want that
and that's a get
post is like
var req = http.request({ host: HOST, path: '/test', method: 'POST' }, (res) => {
res.resume().on('end', () => defer.resolve());
});
req.write();
req.end();
compared to superagent
yeah
GET
superagent.get(`http://${HOST}/test`).end(() => { defer.resolve(); });
POST
superagent.post(`http://${HOST}/test`).send().end(() => defer.resolve());
and the .end() is optional if you use promises
async/await is 👌
also on how I ran those:
nock fake-server
and benchmark package using defer
tfw I'm struggling to get the hang of superagent
lmfao I'm stupid if that's the case.
lol fr
yes
snek is deprecared anyways
How can I get started with the Discord API itself? Specifically, I have an electron Discord RPC app that I'd like to restrict to certain pre-approved users... for that, I'm thinking that I'd have to implement a whole "Log in with Discord" thing... unless there's a way to check for ppl who r in a server using the widget json feature.
What exactly are you trying to do, @opaque eagle ?
Trying to get a list of people in a server?
I have a Discord RPC electron app, and I'd like to only allow certain members who have a specific role in my server to be able to use it.
ok
iirc, you'll need to have them login in their discord account
so you can see who they are
Yeah... but idk how.
Use the OAuth2 workflow. https://discordapp.com/developers/docs/topics/oauth2 should have all the information you need
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
help
I feel like it was written in Latin
anyone know how i can run a discordbot 24/7 on a raspberry pi 3 model B
Anyone could help me or link me a method to create a timeout for a command / user?
npm i -g pm2 @earnest phoenix
can you install node packages?
Ofc lol
would i insert that at the top?
Just download node.js for the pi
or use forever
i do python
you can use forever.js with python
It looks good
Depending on how many modules ur bot has, I wouldn't have all of them in the home page
It's prob fine for 3-4 modules tho so dw
I mean i couldn't imagine that button group thing spanning two lines
or worst-case, going off-screen
Im using bulma
so I don't have to worry about off screen stuff
at least I don't think I do
lmao
cool
What's bulma?
It's a minimal front-end framework
@opaque eagle each module will have its own page, the buttons will redirect them to said pages
const guildnames = [Client.guilds.map(g=>g.name).join(',\n')]```
if (command === 'guildnames'){
message.channel.send(guildnames[Math.floor(Math.random() * guildnames.length)])```
could someone help me find out what is wrong
What are you trying to do?
im trying to get it to send a random guild name of a guild that it is in
Ok
That's kind of a privacy issue
? it works tho
You need to remove [] around guildnames
ok
yeah
and instead of join use split
ok
As joining makes it a string
becuase right now you're creating an array with one string value
and split makes it an array
ok what about the (" ")
what do i put in it
Nothing
ok
a space
so should look like javascript const guilds = client.guilds.map(g=>g.name).split(' ');
RN that array will look something like this:
["Discord Bot List\nServer name\nAnother server name\nlol"]
it says split isnt a function
Oh lol
oof
Its a map xD
so what do i do now?
const guildnames = [Client.guilds.map(g=>g.name).join(',\n')]
becomes
const guildnames = Array.from(Client.guilds.map(g=>g.name));
Nah
yeah whoops
o ok
const guilds = client.guilds.map(g=>g.name);```
yeah that works
ill try it
because i put mines on the page a few days back and have had nothing yet
@warm marsh It says cannot send empty message
o it usually takes 2 hours wats ur bot name?
Socrates
A greek name
What are you trying to send?
Oh random name ok
const randomGuild = () => {
const guilds = client.guilds.map(g=>g.name);
let rand = Math.floor(Math.random()*guild.length);
return guilds[rand];
}
//later on in code:
if (command == "random...") {
let name = randomGuild();
}
something like that
Why?
ah ok
@pearl plaza added bot @Socrates
https://discordbots.org/bot/512937345230831617
That was in mod logs
nvm
it got added and is getting verified
HEALLLP
if (command === 'say'){
async () => {
let a = args.join(" ")
await message.delete();
message.channel.send(`${a}`)
message.react('496007391645794304')
}
}```
i do not get it
What?
uhhh
there are like 3 things wrong
4 things wrong with that
first
Yeah
o
not needed though, so it shouldnt be there
well im trying to get it to delete the message that the author sent
If he wants to keep it there then its his problem not yours
message.channel.send(${a}) => message.channel.send(a)
Yeah do message.delete();
if (command === 'say'){
async () => {
try {
let a = args.join(" ");
await message.delete();
await message.channel.send(`${a}`);
} catch(e) {
console.log(e);
}
}}
});``` motified
ooft
o ok
if (command === 'say'){
async () => {
try {
let a = args.join(" ");
await message.delete();
await message.channel.send(a);
} catch(e) {
console.log(e);
}
}}
});``` like this?
if (command === 'say'){
message.delete();
let a = args.join(" ");
var msg = await message.channel.send(a);
};```
ffs
that spacing
use tabs
ok
You dont really need a try statement there
As your only making the bot say what some one else said
all commands in a file will get very messy in the future
o
Using spaces instead of tabs in sinful
lol
it says that u cant use await out of async
learn and use exports to keep main js clean
^
inb4 unexpected ')' 736:22 or something lol
lol
ok
unexpected spaces instead of tabs 54534:1 
yes
@warm marsh It doesnt delete it
delete what?
the original message
Does the bot have permission to delete messages
idk
aka "MANAGE_MESSAGE"
ook
check
if (!message.guild.me.hasPermission('MANAGE_MESSAGES) return;```
lol
lol not channels
forgot a quote up there @warm marsh
lol
ikr
no
Yes
nonono
meh
message.something
message.blablabla
message.function()
msg.something
msg.blablabla
msg.function()
Can I ask why the owner of this server is displayed as a userid? while all the other servers my bot is in it displays as a username? is it because the user disabled pings?
oh k
Anyone has an example how to timeout commands? So people can't spam it? in javascript
@granite hedge http://bfy.tw/KvTl
Lol
That's globally for all users
that's easy, I wanted a person based timeout without needing to write it to a database everytime
store a map of the last time a person used a command -> check the previous time whenever someone uses a command -> if difference is too small, error out, else run cmd
Thanks
Hey guys... Here's my node.js bot: https://github.com/SinistreCyborg/Wave
Whenever I run the add-tag command (Commands/tags/add.js), it gets up to line 24, but something goes wrong there (no errors are produced).
It doesn't error... but I found out one thing...
The commands work just fine when I use sqlite... when I switch over to my postgres DB, it does what I mentioned above.
Asssets/sequelize.js (Line 2) ```js
// When it says this, the commands work fine:
module.exports = new Sequelize("testdb", "user", "pass", {
dialect: "sqlite",
logging: false,
storage: "file.sqlite"
});
// When it says this, the command does what I said earlier:
module.exports = new Sequelize("CONNECTION STRING HERE", { logging: false });```
Could someone help me with this error? quick.db install is breaking again ```
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
there is no build tools
so npm i windows-build-tools
yep doesn't work
still
Its there
and everything
im so confused
https://cdn.discordapp.com/attachments/510232407358832661/513873339220230165/image0.png vertical tabs on mobile look lame. It also wouldn't be nice if there were like 8 modules (pretend the text are modules lmao)
what should I do instead
make it better
could I do it in a command?
nope
(for the update)
oh
I installed it
and its still saying the same thing
I hate this
@topaz fjord that's not very specific
why are you asking dbl for design ideas? they messed up darktheme smh
how do you use css in the long description and/or bot page please they’re judging me for being a default
style tag
define style tag
i have never used html before
o, better start googling
css
hello
Put a drop down for the commands tab @brittle nova
Wix.com @winged shell
Jk tho don’t actually do it
Because I am sort of struggling
I want to make something like that. It's for a class task
No
oh
I am making a socket io chat for my class
Blocked and we have to code it ourselfs
oh wow
Can someone help me what a “Server Format” is?
hi guys
What i have to do to have http://prntscr.com/lkdc8j online mod. Reinvite the bot here?
yes
you might wanna check #topgg-api pinned messages
Okay ty
can someone help me with posting my servers stats on the botlist
it gives my errors
like my server counts
Failed to post server count
Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
Traceback (most recent call last):
File "C:\Users\hamza_000.HAMZA.000\Desktop\discord bot python\ChatManager\Chat Manager 5\DiscordBotsOrgAPI.py", line 25, in update_stats
await self.dblpy.post_server_count()
File "C:\Users\hamza_000.HAMZA.000\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dbl\client.py", line 100, in post_server_count
await self.http.post_server_count(self.bot_id, self.guild_count(), shard_count, shard_no)
File "C:\Users\hamza_000.HAMZA.000\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dbl\http.py", line 189, in post_server_count
await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)
File "C:\Users\hamza_000.HAMZA.000\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dbl\http.py", line 160, in request
raise Forbidden(resp, data)
dbl.errors.Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
import dbl
import discord
from discord.ext import commands
import aiohttp
import asyncio
import logging
class DiscordBotsOrgAPI:
"""Handles interactions with the discordbots.org API"""
def __init__(self, client):
self.client = client
self.token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjUxMTYwNDMzODI5Mjk0OTAxNCIsImJvdCI6dHJ1ZSwiaWF0IjoxNTQyNTYzODIxfQ.9Ttr7uFhY9-tBIjsbuscmERw2UNwy9O6gwkt7kpc8rQ'
self.dblpy = dbl.Client(self.client, self.token)
self.client.loop.create_task(self.update_stats())
async def update_stats(self):
"""This function runs every 30 minutes to automatically update your server count"""
while True:
logger.info('attempting to post server count')
try:
await self.dblpy.post_server_count()
logger.info('posted server count ({})'.format{len(client.servers)}))
except Exception as e:
logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
await asyncio.sleep(1800)
def setup(client):
global logger
logger = logging.getLogger('client')
client.add_cog(DiscordBotsOrgAPI(client))
@loud salmon help me please
i dont do python
who does python?
dunno
@earnest phoenix remember to reset ur token since u leaked it :^)
oof lol
who can help me with this error no module named 'logger'
no module named 'logger'
I was joking sir
From your code it seems that you can't access logger
in your update stats function
idk how global works in python
import logger
import asyncio
import requests
import logging
@client.event
async def on_ready():
global logger
logger = logging.getLogger('client')
client.add_cog(DiscordBotsListComAPI(client))
class DiscordBotsListComAPI:
"""Handles interactions with the discordbotslist.com API"""
def __init__(self, bot):
self.client = bot
self.token = 'token'
self.client.loop.create_task(self.update_stats())
self.requests = requests
async def update_stats(self):
"""This function runs every 30 minutes to automatically update your server count"""
while True:
logger.info('Attempting to post server count...')
try:
payload = {
'shard_id': '0',
'guilds': len(list(self.client.guilds)),
'users': len(self.client.users),
'voice_connections': 0 }
headers = {'Authorization': f'Bot {self.token}'}
url = f'https://discordbotlist.com/api/bots/{self.bot.user.id}/stats'
r = requests.post(url, headers=headers, data=payload)
print(f'Status code:{r.status_code}')
except Exception as e:
logger.exception(
'Failed to post server count\n{}: {}'.format(type(e).__name__, e))
await asyncio.sleep(1800)
from the looks of it logger is a dependency
r u sure
so?
idk, much about python tho
xd
Healllp me
the import logger is necessary?
why not?
you defined it twice
should i remove it
NameError: name 'client' is not defined
new error
how do i define client in a cog?
@client.event
async def on_ready():
global logger
logger = logging.getLogger('client')
client.add_cog(DiscordBotsListComAPI(client))
@uneven rover can you help me with something
help with?
On my music bot I’m trying to add the bot name and version at the bot of py embed and it comes out this one sec
Look at the top
Lol
Built in
No module named 'logger']
Blah blah
I'm really sorry, you got the wrong developer to asked to. I do code my bot using Discord.js
I’m new to python
I think he is
It's probably a better idea to start off with js-
cba anymore
As people will be able to help you more
Py music bots have better bit rate and quality
Overall
cos i alrdy did lots of things with my bot
what's equivalent to .then(() =>{}) in python?
how many servers is you guys bots in?
r u sure @earnest phoenix
I think that's mainly because most the js libraries have alot of crap in them that u never use
Go in testing
I think that doesn’t exist @uneven rover cause python read code line after line and execute line after line
Not global send
Which uses up alot of resources
what about you Wesley and Dorain
what bot
@wooden iron
what does it do?
Gambling games
isee i see
@late hill I’m just saying what I’ve heard and exspericed
With my bot
And a js bot
i did +help...
Memory doesn’t matter to me
Well if the bot can do the same stuff using less memory
I have 8gb 2vcpu 1gigabit down and upload vps vm
It probably means the library is doing stuff it shouldn't
My bot doesn't even use 300MB ram
I don’t pay anything becuase my school pays for Microsoft azure
wow
Discord.js library caches 200 messages, correct me if I'm wrong
So I can host all of your guys bots if you want Ubuntu , windows ,mac w
Whatever you want
@earnest phoenix u could have done it in dm or with @wooden iron help
who is good at python ?
xd
too late
What vps do you guys have
where do you advertise your bot
and how long have you had it for
I think I get from 11-16ms on my bot
Because
Overtime
so what I did was const Discord = new Discord.Client({disableEveryone: true, messageCacheMaxSize: 5}), then magic
West ly
Wesley
yes
lol
hi
Hello Fishy
My bot got approved
GG
👏
Like 3hrs who

Fishy what's yours bots name?
@coarse carbon
You da bomb
Best bot Fishy
Anyone know how you could get the total amount of users for your bot
Because client.users isn't all of them
Bro
Due to caching I guess
.memberCount
?
No way
@late hill how are you sharding atm
I used this epic hack called MaxShards: 2
or maxShards probably
You owned reaction role and I never knew
Bro fuck I should have hurry up with the VPS
Gay
?
Wow they have 16gb ram 6 vcpu plans
I should have gave you
Ffs
Reaction role
i wasn't going to use it for my bot tho

XD
Because I was giving him a vps vm for hosting for free
But it took to long
Cause it’s gay
Oh lmao
Umm
Because I’ve always done it free
I have no need for it
Ask fishy
@late hill can you show the code for the maxshards
yeah I was gonna use for some random stuff
but my friend got a better one
¯_(ツ)_/¯
@earnest phoenix why does your school pay for such a big plan?
Because we use it for coding and programming
But I use it for hehe my own shit
XD
Yeah but that's way too much for coding
It's an option when defining client in eris
Lol
Idc
js
You want to host your bot I fixed the issue
With Eris library
alright idk why I'm looking into python
I can show you guys plans
And you pick what’s good
I have 2vcpus 8gb of ram 1gigabit each way and 128gb ssd
I don’t need more than that
@late hill iterate .shards
Canadian dollars
What
Everyone on the server want to get that plan and yes
why
for (const shard of client.shards.values()) {
//do something with shard.latency
}
@late hill
Because with that I can host everyone’s bot
Xd
I have a windows 10 vm that I’m running it on
open source bots
That’s on Microsoft azure
If you want a vm to host your bot like Ubuntu that’s private to only you let me know no cost needed
Azure is a vps?
Jesus
azure is just like aws and gce
@late hill oh my bad, thought you asked for latency, you are asking for users count
let me check
hugs Daddy*
im good, Santa is coming and its almost Christmas
LOL
For free?
Why would you give some randomer a free one
yeah, I'm currently satisfied with my plans, thank you for your wonderful offer, may it bless someone who needs it
Because I’m a nice guy and want to help someone that needs it
@late hill Doesn't look like there's an easy way but new Set([].concat.apply([], Object.keys(bot.guildShardMap).map((id) => bot.guilds.get(id).members.map((m) => m.id)))).size.toLocaleString()
Why use set?
I can make a vps Rn and give you rdp and credentials to prove I’m telling the truth if you want
Or I meant a vm
awww
@warm marsh unique values
@earnest phoenix yeah eris dev said it's unnecessary overhead
I do dude you seem like you need it XD
so you'll have to do that
?
Santa is no longer giving gifts, it's about receiving
@late hill Here's a more readable version
new Set(
[].concat.apply(
[], Object.keys(bot.guildShardMap).map(
id => bot.guilds.get(id).members.map(m => m.id)
)
)
).size.toLocaleString();
@keen drift for what “@earnest phoenix yeah eris dev said it's unnecessary overhead”
xd
oops pinged the wrong person
@late hill eris dev said it's unnecessary overhead, so you'll have to do that
Yeh
@warm marsh just let me know
It's pretty much the same for getting the guilds per shard
Know?
Also go in testing 1
it's getting members for all the guilds in shards
Yeh
Object.keys(client.guildShardMap).filter((id) => client.guildShardMap[id] === 0).length.toLocaleString()
like that
?
is what i use to get guilds per shard
fun
xd
You need to get your bot approved first
anyone know whhy?
know why of what
the reason
you gave us a screenshot of one line of irreverent stuff with no trace
show full error for more help

what python version
can you do import sys; print(sys.version) just to confirm
you can do it in the code
for older version yeah
I don't know much python for bots so no idea
yeah
oh
does not show in a download
only shows 3.6
u wanna install older version?
wdym
how are you starting the bot..
w t f
fuck me

do you just "double click" python file?
you need milk
then run it via cli
you can specify version to run
it bundles with two py versions
import discord
import youtube_dl
from discord.ext import commands
my imports @earnest phoenix
jesus
using python3
i use VS
omg
everyone was noob at the beginning ;
its not my first one but ok
its never showed that error on my bots
@earnest phoenix dude, you have to run your bot using python3 version
you can do that by running python 3 from cli
yeah I was a noob, but at least I googled things 
I’m a noob

