#development
1 messages · Page 831 of 1
did you install the new node version?
I don't get that
alternatively, you can use nvm
I can't
It won't work
I tried so hard
But its all this extracting thing
Its annoying
thats how linux works lol
just install nvm using the wget link from their installation instructions
then run nvm install 12.16.1
nvm is node?
nvm is node version manager
I can't install that
Do I have to install the whole thing on github?
All the files?
read their installation instructions
I can't copy or paste the command for some reason
It does ^V
I installed it but it says command doesnt exist when I try nvm
restart your terminal
downloading nvm install 12.16.1
oo
@quartz kindle the only problem now is
bot.user.setGame is not a function
I'll try setActivity
done
gj
Learning js would be a good starting point reading this chat history
Ye
How do I embed a image into my bot description
It's not working like it does in normal HTML
<img src="<url>">?
@royal portal console.error not console.log
I think you have to put a then() before catch(i think)
It's bot.guilds.cache.size
Aye!
Yep
I just need to know how to use catch
Like where to put
msg.reply("test")
in that
on promises, function().catch(...)
After a function
msg.reply("test").catch(console.error);
on non-promises,
try{
function()
}catch(e){
...
}```
@unique nimbus that wont work
<Message>.reply() is async, so yes.
@royal portal mine is like this:
message.reply("Aye!").then().catch(console.error)
Try it and it may work
Did you use it?
Yup
It depends on where the function ends...
in js, semicolons aren't required to end lines.
doesnt matter if you use them
I personally dont
others do
doesn't make a difference that I've seen
Is his script correct though?
Mine?
It works for me tho
@royal portal It's bot.user.setActivity
should work
well status is online
idle
etc
Hmm
I use setActivity for the playing status
activity is game stuff
Oh i didn't saw it... Status?
setStatus("idle") should work
I have
Hmm...
That doesn't work?
nope
That's suspicious
here's my code
bot.on('ready', () => {
console.log('Ready to Protect.');
bot.user.setStatus('idle')
bot.user.setActivity('discord.js | Prefix: !')
});
Any ideas?
@royal portal what's your discord.js version?
latest
Hmm.. you mean stable or 12.0.2/12... idk which one is the latest tho... @royal portal
stable is 12 now
v11 is now a previous version
Hmm...
That's kinda suspicious
Not sure
Yea that might work
i tried sending a status packet to the websocket and it just disconnects me lol
@quartz kindle .setStatus is working for me in v12
yeah so idk
Not working for me
bot.on('ready', () => {
console.log('Ready to Protect.');
bot.user.setStatus('idle')
bot.user.setGame('discord.js | Prefix: !')
});
Hmm lemme test setStatus on 12.0.2 and tell if it works or not
I just can't make my bot idle
or dnd
just online
It worked in older version
somehow messed up this version
Hmm
(new)
This is so awkward
@royal portal it works for me in 12.0.2 tho
maybe i forgot the ;
Hmm...
How to creat my own rhythm sever -,-?
@austere tapir the what server?
idk
Hmm it wont set the idle for my bot
Make a server
I don’t know how to use discord-,-
@zenith terrace you also use discord.js but in which version?
Already make a sever
v12
@zenith terrace setStatus working for you?
No
@earnest phoenix is it really working tho? does it have the yellow icon?
@quartz kindle the yellow ball thingy?
Hmm no it's set online green ball status @quartz kindle
yeah
when you do setStatus, it changes the library's internal status, but doesnt appear to have any effect on discord
How ?? 🥺
But when i do userinfo it shows that the bot is idle... @quartz kindle
Discord Settings
Thanks for watching this is not one of my usual videos so I’ll be back to those vids next video
Also check out my discord down below...
[SOCIAL MEDIA LINKS]
Instagram: https://www.instagram.com/jarhead_mstr/?hl=en
Twitter: Neb (@jarheadMSTR) | TwitterTwitter › jarheadmstr
G...
we are not sure Blox
I think when you set a bot to idle... It doesn't show the yellow ball thingy... But...
Lemme test on dnd... Let's see if it's gonna change the status ball to red
lemme see
Well it might be a problem with Discord
@quartz kindle wait a second... Is this the idle status ball?
Yes
But... I changed the bot status to dnd and instead of red status ball
.. it changed to yellow status ball which is meant for the idle status
This got really confusing
Tried dnd, not changing
@zenith terrace i think the setStatus is drunk or something...
I guess we are stuck on the green xD
nvm found how dumb i am
Oof
@zenith terrace wait a second
Now it's changed to the red after changing the status to dnd... I think i have found the solution
Will you guys ping me once you found solution?
I think we have to wait... For it to upload the status info to the bot data itself... So it could change and no it's on 12.0.2
@royal portal whats your problem ?
We can't set bot status
bot.user.setStatus doesnt work
I tried setting to idle it just ignores it
no errorss
which language?
discord.js
@royal portal you Know what?
Set the bot status with
bot.user.setStatus('idle')
And wait 2 minutes...
Ok
last time i tested it didnt work at all
Yea... The solution is patience
client.user.setActivity(-help to see my commands | ${client.guilds.size} servers., { type: "LISTENING" })
client.user.setStatus("idle")
Lemme restart bot
i think its just discord being drunk
thats whats in my bot
I been waiting 5+ mins since I changed it to dnd
last time i tested, it didnt do anything and it caused my bot's connection to disconnect/resume
now it worked pretty much instantly
drunkcord
@royal portal try this in your ready.js file
I did
module.exports = {
execute: async(client, db) => {
console.log(`Ready on client ${client.user.tag} and loaded ${client.commands.size} commands.`)
client.user.setActivity(`Free gay`, { type: "STREAMING" })
}
}
@quartz kindle i think we talked about the issue and the code tried to fix himself instantly but it still doesn't work for @zenith terrace
lmao
It doesn't work
setStatus is drunk af
Did you do the code i gave you and wait 2 minutes ? @royal portal
Hmm
seems to work for me
Oh well. I can do without a different status
It works for me too but it does have latency(Latency is drunk asf rn lmao)
Idk who did something to setStatus but it's drunk
one discord mod
'hey lets see what this button does'
removes setStatus
other mod:
'why u do that'
ppl in #development
Lol
Or gives it alcohol or weed and setStatus becomes high asf
LOL
setstatus is in partnership with windows 7
end of support
setstatus
2015 - 2020
me gtg now
cya ppl
K then cya
@earnest phoenix DM me or ping me if it has been fixed yet
K
cya xd
I've literally never seen a code function more drunk than setStatus before
Lol
switched from discord.js v11 to v12.
This does not work anymore
for (channelTemp of guild.channels) {
i only found
for (channelTemp of guild.channels.cache) {
but i want to traverse all channels of that guild, and like this it does not for the non-cached ones i think.
How can i traverse all of the channels with v12?
@viral spade guild.cache.channels
Is it?
channels are all cached by default, unless you tamper with the library
there is no such thing as an uncached guild channel in an unmodified discord.js
Hmm when i don't use cache it doesn't work
oh ok thx tim! so it should work like this. i will look at other possible problems. thx so far
@quartz kindle oh it's actually guild.channels.cache i forgot lmao
Why is this change with all the cache in between? is there something i need to take care of now, that was not present in v11?
Idk... I think the developers of discord.js wanted to move most of them to cache methods... @viral spade
i mean wasnt it cached anyways?
God knows what's going on their mind
they did it to clarify and separate caches and rest methods
oh ok makes sense
for example channels.get() was a sync caching method, while channels.fetch() is an async rest method
they didnt want to keep having them all clumped together
But stil v11 was better 😦
so now its easier to differentiate, ie: manager.X = async rest methods, while manager.cache.X = sync caching/collection methods
no u
But they made some people triggered because now have to use cache and most people forget about it because they aren't used to it... Like me that i forget about it all the time
yeah, nobody likes changes, even if its a change for the better
lul
They should have fixed the setStatus instead of adding more ways to trigger us like cache lmao
Tim i need your help again im too stupid...
i had bot.shard, i could access a shards own shard property and retrieve its id within the shard. how can i do this now?
Now i get back a ShardClientUtil with a ids and count value.
i dont even understand why i can access multiple shards within one shard!?
anyone here familiar with Discord.NET?
I'm just asking to double-check before potentially accidentally blowing up my bot lol
@idle mountain yea you can definetely load certain shards at login so you can have 1 app do 1-5 shards and another with 6-10
Discord.net does have a few timeout issues though if you try to start the bot with lots of shards, the way i do it is load the first shard then wait for that to become ready and then load the next shard
haha that issue is actually why im trying this system
The library can’t handle my bot’s 20 shards at all
or 30 shards
I'm running my bot in 1 app with 18 shards and the way i do it works
So I’m just gonna try using this system since it’s essentially just handling a bunch of smaller bots that are sharing ram
hmm
idk, when I just let it all be in a single object, every few hours a shard will get stuck on the “Disconnecting” state
and will never come out of that state, even if I manually shut it off and turn it back on
You can start/stop shards manually too
With .StopAsync, yeah?
If I do that on a shard that’s “disconnecting” it doesn’t do anything
the task just delays forever it seems

If you wanted to do it that way you should also take in stuff like notifications or tasks that you run every hour for example posting server count
They wont be able to access the servers from your other app unless you setup something for that
I’ve already written functions to let it get all the servers across all the instances
I just need to know that this isn’t gonna rate limit me somehow or something
I’d assume this isn’t really changing much on discord’s side anyways but I wanted to make sure
No the client itself will handle logins perfectly fine i have never had any of my tokens reset
awesome, thanks!
Also the way that i do is on startup load the first shards
await Client.Shards.ElementAt(0).StartAsync();
And when that shard becomes available it will start the next shard in
private static int ShardsConnected = 0;
private static Task Client_ShardReady(DiscordSocketClient client)
{
if (ShardsConnected != MaxShards)
{
ShardsConnected++;
Task.Run(async () =>
{
await Client.Shards.ElementAt(ShardsConnected).StartAsync();
});
}
}```
So that it does not block the thread
And it will stop once all shards are loaded
ty! this is all helpful
There we go fully edited it with working code, i have an extra ready bool for any of my services to access.
anyone knows how to delete mongoDB collection?
like one collection?
How can i shard my discord.js v12 bot onto different machines?
That means having 2 machines.
Machine 1 with ShardingManager1 that spawns Shard 0-5
Machine 2 with ShardingManager2 that spawns Shard 6-10
How can i do that?
const colour = require('../colours.json');
const Discord = require('discord.js');
module.exports.run = async(client, message, args) => {
let uEmbed = new Discord.RichEmbed()
.setTitle('Guild Info')
.setColor(colour.thesportstacker_blue)
.setImage(message.guild.iconURL)
.addField('Server Name', `${message.guild.name}`, true)
.addField('Owned by', `${message.guild.owner}`, true)
.addField('Total Members', `${message.guild.memberCount}`, true)
.addField('Created on', `${message.guild.createdAt}`, true)
.addField('Roles', `${message.guild.roles.size}`)
message.channel.send(uEmbed);
}
module.exports.config = {
name: "serverinfo",
aliases: ["si"]
}```
```Error: Discord.RichEmbed() is not a constructor```
@wintry sonnet
v11 RichEmbed is in v12 MessageEmbed
Thanks
what is the error
Did you upgrade to djs v12?
Have you checked if there is an update for the lib you are using?
@prime cliff I don't think python has a library called djs
Oh right .py
noes
the fact that the other guy replied with yes
Not reading errors
Why did they change it to MessageEmbed?
Consistency
Incoming embeds have been MessageEmbed for a while, so they merged RichEmbed into it so there's just one embed class
Still i'll have to change my code now
Sucks
@earnest phoenix your cog doesn't have dbl_client property. Simple
And also i think MessageEmbeds don't work in node version less than 12
The whole library doesn't work in node < 12 for djs v12
Yeah i meant that
And glitch has node v10
how to put dbl_client @slender thistle
read docs
What does your current code look like
Do you think you're confusing your needed property's name
`import dbl
import discord
from discord.ext import commands
class TopGG(commands.Cog):
"""Handles interactions with the top.gg API"""
def __init__(self, bot):
self.bot = bot
self.token = 'dbl_token' # set this to your DBL token
self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes
async def on_guild_post():
print("Server count posted successfully")
def setup(bot):
bot.add_cog(TopGG(bot))`
this is my code
@slender thistle
And where are you trying to access dbl_client
Can I have some help with doing aliases?
I have this code so far
if (command.aliases && Array.isArray(command.aliases)) command.aliases.forEach(alias => client.aliases.set(alias, command.name));```
format
if(!client.commands.get(cmd.slice(prefix.length)) || !client.aliases.get(cmd.slice(prefix.length))) return;
client.commands.get(cmd.slice(prefix.length)).run(client,message,args);
if (client.aliases.has(cmd.slice(prefix.length).toLowerCase())) {
client.commands.get(client.aliases.get(cmd.slice(prefix.length).toLowerCase())).run(client, message, args)```
d.js = v11.6.1
@restive furnace you there still?
You been typing a long time
if i remember right i just did like this: in cmd file: module.exports = { run: /*cmd here */ aliases: ["test", "test2"] } and on command handler /*cmd handler...*/ /* line where you add the command in your commands list */ command.aliases.forEach(a => /*cmdaliases list*/.push(a)); /*cmd handler*/ and on message event: /*before cmd.run*/ if (!client.commands.get(cmd.slice(prefix.lenght)) || !aliases.find(a => a === cmd.slice(prefix.lenght))) return; or smh like that
(im on mobile so sry slow typing)
Oh ok thanks
Would this work
if (command.aliases && Array.isArray(command.aliases)){ command.aliases.forEach(alias => client.aliases.set(alias, command.name));}
And that
if (!client.commands.get(cmd.slice(prefix.length)) || !client.aliases.find(a => a === cmd.slice(prefix.length)))return;
And can you put the aliases before the run bit
It just doesn't work
any errors?
I will see
if you're on vsc/webstrom or any other that can be runned as debug mode. so run it as debug mode and type in the console ur aliases array/map name and send screenshot of the contests
module.exports = {
name: "avatar",
aliases: ['av', 'pfp'],
run: async (client, message, args) => {
Is that right?
https://discordapp.com/channels/264445053596991498/272764566411149314/691206187324145735 Plus these two bits of code
It just wom't wor
yes
module.exports = {
name: "avatar",
aliases: ['av', 'pfp'],
run: async (client, message, args) => {
thats right atleast
How about the command handler stuff
did u try this
if you're on vsc/webstrom or any other that can be runned as debug mode. so run it as debug mode and type in the console ur aliases array/map name and send screenshot of the contests
so see if it even adds the aliases
I will have to use chrome for that
what youre using for editing your bots code?
Glitch
Wew
?
@restive furnace in debug mode what should I look for
not anything anymore just read that
aand change your version to 11.6
I've tried that
What's the error?
And it's better if you use vscode or some other editor for coding than glitch
Why
They have debugging tools
So does glitch
Hmm
you just have to use chrome
It isn't that hard
Anyway how do I tell if it adds aliases or not using debug
Yes
let command = client.commands.get(cmd);
if (!command) command = client.commands.get(client.aliases.get(cmd));
why dont the aliases work
Just console log client.aliases to see if there is anything
Glitch won't loaf
no aliases come up
yea thats a problem with glitch rn
yet theres aliases in every .js file
pls wait till the problem is finished
You would need to load up aliases for each command
For loop through each command
read the docs
can you help me with that
im new to js and i dont understand anything to do with the docs
and see how to make a good command handler
@earnest phoenix u can ask ur questions here dw
And Shiemi I can't?
i dont get how to make the aliases work
command handlers are suppose to be made according to the user
Basically just telling me to piss off
u are not giving enough info for us to help
i have aliases there and it is defined
I have given ton of indo
Yeah same
command handlers never worked for me
last time my bot broke
i got a new pc after a few months
bot broke so i gave up
now im back at it
and it actually works but aliases decide to have a nice vacation
no
It isn't
adding an aliases property to your export won't magically store everything in client.aliases
but it only works with the main command
lol
idk where to store it
i am confusion
How does it work then
You update your command handler so that it'll check for the name & aliases
i dont think you caught the bit where i said i was new to js and docs make like no sense
You don't need documentation for this
And I told it set aliases too
It's a programming problem that you have to solve
In the message event
yes glitch is down
You should sign up to their text message thing
the command doesnt work
show what your initial command handler looked like
const { readdirSync } = require("fs");
const ascii = require("ascii-table");
const table = new ascii().setHeading("Command", "Load status")
module.exports = (client) => {
readdirSync("./commands").forEach(dir => {
const commands = readdirSync(`./commands/${dir}/`).filter(f => f.endsWith(".js"))
for (let file of commands) {
let pull = require(`../commands/${dir}/${file}`);
if (pull.name) {
client.commands.set(pull.name, pull);
table.addRow(file, '✅');
} else {
table.addRow(file, '❌ -> missing something??');
continue;
}
if (pull.aliases && Array.isArray(pull))
pull.alises.forEach(alias => client.aliases.set(alias, pull.name));
}
});
console.log(table.toString());
}```
i fixed ascii table so that works
wtf
Alright
i SPELT ALIASES WRONG
so
Basically pull is the object you're exporting from each command file
yes
Do you understand that
yeah
ok
That means that, when you add something to the export
such as the aliases property
It'll be available in there
i guess he already understood.
Mine works similiarly

So those aliases will be in pull.aliases
Now it's up to you
to make your command handler work
with that information
mine works similarly! puts picture of read the docs
That simply shows you adding an alias property to the export
Which as said, doesn't magically make things work
You have to use the data
if(cmd.length === 0) return;
let command = client.commands.get(cmd);
if (!command) command = client.commands.get(client.aliases.get(cmd));
if (command)
command.run(client, message, args);
the middle bit
i thought that made them work
@late hill look at the link below the exports thinhg
How about you properly format the code and don't have me checking multiple messages
🧠 🤔
@finite bough help please
??
Your client.aliases approach can work but there's 2 issues with it @earnest phoenix
i dont understand like anything about this
You're checking if pull is an array
which is never the case, it's an object with all your command data
You also made a syntax error below that
how
Which doesn't show an error, because your code never reaches that point due to the issue above
i should just shove it all in bloody index.js
wesley did you check my one
You probably meant to check if pull.aliases is an array and not just pull..
for him or me
Loo
i dont fucking understand

no
The code you wrote
if (pull.aliases && Array.isArray(pull)) checks if pull is an array
I did that too
oh
I wish I had a vps
What code did you use
do you have a handler folder with command.js or any shit in it
Yes
idk
ok
const { readdirSync } = require("fs");
const ascii = require("ascii-table");
const table = new ascii().setHeading("Command", "Load status")
module.exports = (client) => {
readdirSync("./commands").forEach(dir => {
const commands = readdirSync(`./commands/${dir}/`).filter(f => f.endsWith(".js"))
for (let file of commands) {
let pull = require(`../commands/${dir}/${file}`);
if (pull.name) {
client.commands.set(pull.name, pull);
table.addRow(file, ':white_check_mark:');
} else {
table.addRow(file, ':x: -> missing something??');
continue;
}
if (pull.aliases && Array.isArray(pull.aliases))
pull.aliases.forEach(alias => client.aliases.set(alias, pull.name));
}
});
console.log(table.toString());
}```
but you need to do
npm i ascii-table
because it uses an ascii tabl
e
Why
if you dont it'll return with errors
because it uses an ascii table to hold stuff
What about the message event
let command = client.commands.get(cmd);
if (!command) command = client.commands.get(client.aliases.get(cmd));
index.js ^
put ```js
client.commands = new Collection();
client.aliases = new Collection();
Yeah ok thanks
Ik
ok
Discord.Collection
11.6
it should prpbably work
ok
CXX(target) Release/obj.target/integer/src/integer.o
../src/integer.cpp: In static member function 'static Result Integer::Cast(v8::Local<v8::String>, uint8_t)':
../src/integer.cpp:329:33: error: no matching function for call to 'v8::String::Value::Value(v8::Local<v8::String>&)'
329 | v8::String::Value utf16(string);
| ^
In file included from /home/container/.cache/node-gyp/12.16.1/include/node/node.h:63,
from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
/home/container/.cache/node-gyp/12.16.1/include/node/v8.h:3158:5: note: candidate: 'v8::String::Value::Value(v8::Isolate*, v8::Local<v8::Value>)'
3158 | Value(Isolate* isolate, Local<v8::Value> obj);
| ^~~~~
/home/container/.cache/node-gyp/12.16.1/include/node/v8.h:3158:5: note: candidate expects 2 arguments, 1 provided
In file included from ../src/integer.hpp:3,
from ../src/integer.cpp:1:
../src/integer.cpp: At global scope:
/home/container/.cache/node-gyp/12.16.1/include/node/node.h:601:43: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
601 | (node::addon_register_func) (regfunc), \
| ^
/home/container/.cache/node-gyp/12.16.1/include/node/node.h:635:3: note: in expansion of macro 'NODE_MODULE_X'
635 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/integer.cpp:408:1: note: in expansion of macro 'NODE_MODULE'
408 | NODE_MODULE(integer, Integer::Init);
| ^~~~~~~~~~~```
wtf
😦
please info it
normally this is not a error
used memory problem
show entire error
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/691222353358618634 this is just compilation outputs, this is not a error
try doing npm i bindings
try running npm i bindings in the shell
🙂
?
no different alternative? 
the error is that you're trying to install quick.db
quick.db is based on better-sqlite3 which is a native module made with C code, not javascript
installing native modules requires the system to support the proper build tools to compile it
which your hosting provider might not support by default
from the little i've seen, it seems they want you to use their integrated mysql databases instead
what can i use for displayAvatarURL or how do i put it in a footer with .setFooter
kick, ban, memes, cat, dog
8ball
minesweeper
np
ive only got say, ping and am doing a whois / userinfo
i started my bot a few hours ago
its hosted so i should be good
@earnest phoenix do you host your bot
if you need my help in doing it ill give you some stuff
same
i swapped laptops but then my github repo got deleted and the file got corrupted
thats nothing
i spent 5 months on my bot
and then it just flew up to bot heaven
and went offline forever
3 of my bots
another broke down recently
;c
Guys how do you setup the premium feature
Like how to limit premium bots to paid users only
No
Do you need a dashboard for that?
Glitch is having downtime now and I can’t access my project
I did
Is Heroku better?
sort of
Or use another good host
Like DigitalOcean
How many free storage does it have
Yea but how many storage is provided for free
ill check
I just bought a vps for 2.5 bucks
And then they don’t provide me a ipv4 adress
And then I can’t install node v12 on it
Like how to limit premium bots to paid users only
@ocean violet save premium users IDs in a database, check if message author exists in DB, if not ignore, if it exists, let the bot do the things
And then I can’t connect to it
@flint dew Uhh how does dyno do the work? If the server owner has premium, everyone can use it
because the server owner bought it
it uses a dashboard
takes you to a one-time invite link i think
How is it possible to have a one time invite link for a bot lol
They have a different system obviously
How is it possible to have a one time invite link for a bot lol
@ocean violet it's not
Dashboard is too complicated for me
Do the thing I sent earlier then? 👀
What host for you buy your vps from?
Vultr
Worst vps
Yea it’s good
@golden condor have u fixed ur command handler?
Vultr is somewhat nice actually. You might have to google "how to access vultr vps through terminal"
Not yet no
hmm mind if I dm?
Sure
No they just provide me an ipv6 and a private ipv4 address where I can’t ssh into
And if I want a public ipv4 address I have to pay extra 2 dollars a month
Do they have a web console?
Yea
Super slow
And I can’t even install node v12 on it
It shows me that v10 is the latest
"how to update to latest node version on [OS OF VPS]"
I use DigitalOcean now, separated my DB droplet, my website droplet, and my gitea instance though
I left my bot on for like 4 hours and the setActivity stopped working
I tried and it’s not working. I sent them a full refund request
Not gonna use Vultr again
For my bot, the setActivity stops working after a few hours (using discord.js)
Js responses quicker than python
wdym
I need to sell bots to host my own bot
@quartz kindle I left my bot on for like 3 hours and the setActivity doesn't work
It just removed the playing status
And I had to restart bot
I'm not sure why it is doing that though
@earnest phoenix you can live edit with glitch tho
I use a dev bot running locally and just git pull the changes
Another free hosting platform
js doesnt necessarily respond quicker than python, i mean, 99% of response speed is network dependent, nothing to do with language
I’ve heard that someone unloads the Minecraft world and then host the bot on a Minecraft hosting platform for free
https://werewolf.codes/t/thaldrin/src/branch/master/DiscordModules/Developers/update.js I do this for getting my latest files lol
how to add 2 prefix ina single bot
@earnest phoenix it’s not hard, you can set it up running 24/7 under 10 mins
@zenith terrace how to add 2 prefix ina single bot
Check an array
Idk
if(message.content.startsWith(prefix1) || message.content.startsWith(prefix2))
no discord.py4
ok nvm
bot = commands.Bot(command_prefix="/") bro @quartz kindle how to add
@earnest phoenix use Google
guys
if my bot is deployed with heroku and uses common tags
would it still work
because i cant put node models into ghub
because its over 100 files
you dont need node_modules
You could, technically. But idk how glitch works so I can't help
then why wont my bot work with a command
node_modules should always be installed on the target machine using the package.json
no
check the v11 -> v12 guide
all collection methods (get,find,filter,reduce,map,etc) were moved to a .cache property
members.cache.get
channels.cache.get
guilds.cache.get
etc
so members.guilds.members.cache.get
wat
message.guild.members.get
to v12 would it be
members.guilds.members.cache.get
thats a completely different thing
anyway, message.guild.members.get -> message.guild.members.cache.get
i meant guild
but you still said members
bot = commands.Bot(command_prefix="/") bro @quartz kindle how to add 2 prefix in this
instead of message
bot = commands.Bot(command_prefix="/") bro how to add 2 prefix in this
i realised that
js 2020-03-22T11:04:45.077729+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError: Int16Array.DateTimeFormat is not a constructor
well then
i keep using v11 stuff
dont use it
you don't need heroku CLI
bot = commands.Bot(command_prefix="/")bro how to add 2 prefix in this
@earnest phoenix ask in d.py' support server. Repeatedly asking people who can't help you, won't help you
i get this error
UnhandledPromiseRejectionWarning: TypeError: Int16Array.DateTimeFormat is not a constructor
formatDate: function(date) {
return new Int16Array.DateTimeFormat('en-US').format(date);
}
Is there a code to restart all shards? (discordjs)
guys
I need help with a thing
i made this:
but when i do canalestatusbot.send "send" appears as a word and not a object
await images[0].resize(450, 442).quality(100);
await images[1]
.composite(images[0], 140, 354)
.quality(100)
.getBuffer(Jimp.MIME_PNG, async (err, buffer) => {
await message.channel.send(
new Discord.Attachment(
buffer,
"https://cdn.discordapp.com/attachments/676436130790375434/680729481723379735/wanted.png"
)
);
});
});```
what's problem??
How can i make server stats like this
me
look : you create these channels
and you put number zero
after you right click and you take thier id
you just learn how to use guild.channels.create('Member Count: ${guild.membercount}')
im gonna give you a link @robust moth to learn it
bot = commands.Bot(command_prefix="/")bro how to add 2 prefix in this
@earnest phoenix
make command_prefix a list
Please dm me @solemn quartz
@celest viper you can add like a lot prefix in a code just need cases
const prefixs = ['/', '#'];
bruh
bot = commands.Bot(command_prefix=prefixs);
Lol
it doesnt really add bugs, carl has multi prefixes
it is on Discord.js
tought you were using js
js would have a new
python is one of the few languages that don't use a new but use .
Yeah
anyway let's see
I am waiting @solemn quartz
it's not guaranteed they can handle an array. lets dig in
Better use switch then
afaict looks like you'll need to check yourself?
switch?
Cases
hang on it has multi prefixes
@robust moth some days ago i found a really good documentation on discord.js but now i dont find it
i only found this
new Discord.TextChannel(guilddata);
im gonna search more
@robust moth what are you having trouble with
getting the stats or renaming the channels
@earnest phoenix https://discordpy.readthedocs.io/en/latest/ext/commands/api.html
so list is right
I don't use python
tuple works too
wait
But thanks
ignore me -_-
are you using js @earnest phoenix ?
i cant read -_-
dict with functions as values
Python version of cases
@robust moth sorry but I dont find it
Discord.py easily support multi prefix array
switch(var) {
@solemn quartz
case 'somethig':
use the official docs
@solemn quartz no problem
is official docs bad
Better get member count update etc for each channel and rename it on update @robust moth
Like member count update
i mean yeah but like
wonder what part he's having trouble with
Yeah
the events huh... that'd probably be it
Yeah
Events is the only way to do it
ya
and filter for bots and users
big brain
i guess
There is also role update
yup
update isnt needed bc it doesnt change the count 😛
big brain @earnest phoenix

Hey red name
I'm not some kind of god lol
yeah
Just another random nerd on the internet
Yeah we like to call others with green name white name etc last year lol
Lord timo
lol
Psst #development
praise @twilit rapids
Ok
