#development
1 messages · Page 811 of 1
oh the voice channel
nop
wait r there perms for screen sharing?
i mean, you can just post screenshots, no?
Please do not use json for storing
yes, its only the editor thats not updated
files that are altered on the backend (that is to say not in the editor - so either by your code or by using something like vim in your project’s console) don’t automatically get synced with the editor, so Glitch sees the right content if you use it in your code, but you won’t see it reflected in the editor unless you run the refresh command in your project’s console.
welp idk then
¯\_(ツ)_/¯
Why you should use a db :∆
Welp idk how my phone has turned to the Greek alphabet but okii
@finite bough can you show me the code?
@coral trellis
Hola
no spam
@high linden don't spam
Okay
const Discord = require("discord.js");
const fs = require("fs-extra");
module.exports = {
name: "welcome",
description: "changes the welcome permission of the bot",
usage: "welcome True/false",
category: "mod",
code(client, message, args) {
if (!message.member.hasPermission('ADMINISTRATOR')) {
return message.reply(`You cannot use that command!`);
}
fs.readJson(`./lol/${message.guild.id}.json`, (err, db) => {
let wel = `${db.prefix}welcome`
let answer = message.content.slice(wel.length + 1);
if(!answer){
return message.reply("invalid syntax, `welcome [true/false]`")
}
if(answer.toLowerCase() === "true" || answer.toLowerCase() === "false"){
if (err) return console.error(err);
db.wmessageperm = message.content.slice(wel.length + 1);
fs.writeFile(`./lol/${message.guild.id}.json`, JSON.stringify(db, null, 2));
message.channel.send("welcome permission changed successfully!")
}else
message.reply("invalid sytax, `welcone [true/false]`")
});
}
}
wait
"welcone"
Lmmao
Yeah that's weird, it just isnt updating?
Doesn't return any errors when it doesn't?
that code works how am I suppose to get an error
I tried to add that in a file runned by local host
Because it doesnt update
it works
Well if it's not executing correctly
Can you log what is returned when you JSON.stringify it after the update
I dont think it matters though
Because it'd still write
I just wanted to show it to tim
Oh
const GetGuild = message.guild;
if(GetGuild)
{
GetGuild.emojis.create("url of emote", "name of the emote");
TypeError: GetGuild.emojis.create is not a function
what in the world of 
what is your djs version
im on stable branch, 11.6.1
Guild#createEmoji()
Can someone Help Me with this error?:
if(BotMember.voiceChannelID === ${message.author.voiceChannelID}) return message.reply('Non Siamo Nello Stesso Canale
Vocale!')
^
ReferenceError: Cannot access 'BotMember' before initialization
show the code
Of that cmd?
case 'EsciCV':
if(!message.member.hasPermissions('MUTE_MEMBERS')) return message.reply('Non Hai il Permesso Di Usare Questo Comando!')
if(!message.member.voiceChannel) return message.reply('Devi Essere In Un Canale Vocale Per Usare Questo Comando!')
if(BotMember.voiceChannelID === ${message.author.voiceChannelID}) return message.reply('Non Siamo Nello Stesso Canale Vocale!')
BotMember.voiceChannel.leave()
break;
you're trying to access BotMember before initializing it
use code blocks
for the sake of god
69bal
```js
paste your code here
^
case 'EsciCV':
if(!message.member.hasPermissions('MUTE_MEMBERS')) return message.reply('Non Hai il Permesso Di Usare Questo Comando!')
if(!message.member.voiceChannel) return message.reply('Devi Essere In Un Canale Vocale Per Usare Questo Comando!')
if(BotMember.voiceChannelID === `${message.author.voiceChannelID}`) return message.reply('Non Siamo Nello Stesso Canale Vocale!')
BotMember.voiceChannel.leave()
break;
I have a const for Bot member btw
Where is it defined? Can that code block access the const?
const BotMember = message.guild.members.find(u => u.user.username === "Super Bot" )
Where is it defined? Can that code block access the const?
@fast zenith Nope
That works
ive tested it with JoinVC Cmd
is the bot called Super Bot?
^
wat
Searching the Guild for the Bot user when you have it's instance?
???????????????????????????????????????????
just use your instance of the bot
const bot = new Discord.Client()
I just have this
No other
What
I ve seen what u said
Lol
@fast zenith
didn't mean to remove but like this.bot
also that doesn't guarantee it's going to return your bot
^
why do u even need you bot object via searching?
Why when i ask something in this server and i go a minute in aother tab i return here and there are 5 people responding
This happened yesterday too :p
Heaps of people willing to assist in solving your problem
I know
But imagine your asking a thing and u just close your eyes for a second and then discord says you have 40 pings in the same server in the same chat

Im going afk a moment
bye
i have a question if i am using this msg.guild.channels.find(channel => channel.name === "logs") how do i send a msg to the logs channel
Assuming what you provided grabs the channel correctly you can add
.send("Woohoo it works!")
to the end and it will send the message to the channel
more info here https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=send
all g haha happens to everyone 
i have a question if i am using this
msg.guild.channels.find(channel => channel.name === "logs")how do i send a msg to the logs channel
@earnest phoenix btw u could make Channel -> ch
ch => ch.name === "logs"
And this is the same
msg.guild.channels.find
am bakc boi
yah ik
Lul
@copper cradle So how do i fix that bug?
I tried to fix it but it still doesnt work
I Dont think so
yes
really?
5/20s
Once every four seconds approx
^^
So I can change my bot's stat every 10 seconds safely?
yes but idk why youd wanna
^
@earnest phoenix did u get ur answer?
hmmmm
How pay nitro to my bot ? 🙄
what
hmmm
uh
So how some but can use custom emoji
^
make sure the bot is in the server
Animated
Bot can use animated emote without nitro ?
Yea, The only thing you need to make sure is the invite link has the permission to Use External Emojis if your planning to use custom emotes
@earnest phoenix did u get an error
But i have see bot use custom emote in my server
@ionic anchoryes bots can use custom emotes as well as animated emotes
You upload the emoji to yours as long as the bot has the use external emojis permission when invited to another server it will be able to use the emoji from yours
Oh cool
yes
i cant find anything on discords web api for making an invite link,
the library im using (.net) also doesnt seem to have anything,
so before i go rummaging through the depths of sites, does anyone know if its possible to make an invite link through a bot user?
@earnest phoenix do u mean invite of ur own bot?
no,
invite of guild
Server invite that is
sorry, shouldve specified^
okay so discord has a endpoint for this and document it well
lemme search it out
for making invites?
Yep
oh sweet okay, thank you
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Ah, part of the channel class
that's why I couldn't find it then
thank you!
Yep, the invite has to be on a channel
not exactly
@earnest phoenix do ya use SQL?
client.getrank = sql.prepare("SELECT * FROM scores WHERE user = ? AND guild =? ORDER BY scores DESC")
oh wait
how do u set the data in decending order
https://www.w3schools.com/sql/sql_orderby.asp this might help
It should essentially sort them with that query
What's the error?
cannot find columns "score ASC"
you want the top 10?
well yes
you need to order via column
scores
so select <what ever> from <table>
cannot find columns "score ASC" this says score
column name- wcores
then order by
oh mb
colum DESC
scores ACD
if you want top 10 u need DESC
ascending means working up as u go down
do it would order like:
1
2
3
4
5
actually ima try smthing
I will rename the columns
coz i think I named the column and the table the small thing
according to ur Query you are trying to order by a table
which conflicts shit
so yh
change column name so it doesnt conflict
yea
@ハーリ-さん (CF8)#6621
@modest maple
`SELECT * FROM scores WHERE guild =? ORDER BY points DESC`
);```
let ranking = client.getrank.get(message.guild.id)
if(message.content.includes("$rank")){
message.reply(`${ranking.level}`)
}
})
ik the 2nd part is not right
looks alright in terms of query
like
second part needs to fetch all or fetch many
fetchall returns a list/ array
of all the values
you can then take the first 10 from that
like
or fetch many and tell it to get 10
client.getrank.fetch all.get(...)
So vote locking commands is considered voting abuse? Or just vote locking loads of commands?
no
'' throw err;
^
Error: Cannot find module 'discord.js'''
install discord.js
@mossy vine throw err;
^
Error: Cannot find module 'discord.js'
how are you installing it
on console
how can i get all data from my mongodb database
from a collection just .find()
i mean all data
ok so why do i not get messages with eris
eris suc
require('dotenv').config()
const Eris = require('eris')
const bot = new Eris(process.env.DISCORD_TOKEN)
/* commented cuz irrelevant
bot.on('ready', _ => {
setTimeout(_ => console.log(`Yeeting as ${bot.user.username}#${bot.user.discriminator} in ${bot.guilds.size} servers`), 3000)
bot.editStatus('idle', {name: '[object Object]'})
}) */
bot.on('message', msg => {
console.log('e')
//more irrelevant code, dont get anything in console
})
bot.connect()
yeah doesnt work on different bot acc either
just no messages
wait what
okay then
why did it literally work before
with the same code
im not even joking it was working
lmao
here is actual proof that it was working earlier with the same bullshit code
at least now its working reliably, thank you lmao
r e s p e c t
a had paid respect
ok are yall just making fun of my bot
if so do it in dms or #memes-and-media cuz this is development
same shit mostly
well i sure hope memory usage wont climb to 1.5gb after a few days of uptime
yes
What’s the eval to have your bot leave a server using the servers id
What lib
guild#leave method is on most libs, so try that.
Discord.js
Hi, i have a problem in my bot. I want to show in the bot activity the number of servers that used the bot. I tried to use client.guilds.size, but the bot shows the undefined value. Do you have some solutions?
client.guilds.cache.size
Tip for d.js stable users: if you get undefined on some client#object, then just try add client#object.cache always. 
Need a help on something. discord.js
So my bot is in 600+ servers.
when I try to get the server owner id it doesnt work [ Only In A Few Servers ].
How can I fix this issue?
@restive furnace Thanks for the tips
@heavy marsh message.guild.ownerID
@summer torrent thank you. Then how to get a owners pfp?
message.guild.owner.user.avatarURL
https://little-files.glitch.me/data?file=06JE06NO.png what the Actual f is this error?
get it from client
ook thanks you
thanks alot 🙂
client.users.get(message.guild.ownerID).avatarURL
this is also correct right?
Yes

(node:3709) UnhandledPromiseRejectionWarning: TypeError: client.guilds.reduce is not a function
What is your d.js version
new
Very helpful. Anyways, in the latest versions of d.js client.guilds returns a GuildManager to which to get the guild collection you need to access the property cache so try client.guilds.cache.reduce(...) dumb change but that's what happens
someone give me some useful features that i can add
hey guys, I need a little help with sending images in d.js
consider the following:
A - a json is returned from a fetch call, containing the response code and a Base64 image
B - the fetch is necessary for authentication
my question is: how do I convert from base64 and send the image?
d.js can send b64 resolvables cant it?
how? @charred jetty is having some issues getting the image from my api and sending is via d.js
since I barely scratched d.js I'm a bit lost
also, the image is being returned correctly from the api (I've checked)
I've tried sending him the image itself as bytes, but idk how you can send it that way via djs either
It says you can send Buffer resolvables as message attachments
we'll try, thx for the heads up
If that doesnt work you could also try message.channel.send({files:[Buffer]})
(https://discord.js.org/#/docs/main/stable/typedef/MessageOptions)
check how many servers the bot is in and leave the newest?
check how many servers the bot is in and leave the newest?
Yes, there is no other methods.
is there something which logs when your bot joins a new guild
in python there was/is on_guild_join
which lib
I think djs
guildCreate then
^^
can actually read the document
that is so incorrect to the point it hurts
you'd want to leave your newest guilds or prioritize guilds with a low member count to leave
I have a footer to my website, but I want it to stay at the bottom even when zoomed out so there's no white spaces
What property do I need?
I'm coding it all myself
Ok
how did u make it
i mean
how to do the website itself
u code it, but where
how do u started it
I'm using glitch at the moment so I can host it for free while I test it
I'll ditch glitch asap because it sucks and move the code to a real host + tld
If you want a proper URL, you have to pay
^
ik
Tbh html and css is relatively easy if you have w3schools helping you out
No real benefit to using a website maker if you can do it properly
you are expecting things to be free?
welcome to life
and domain
lol
Yeah
Domains are pretty cheap if you get them bundled with hosting
The domain is often free
im using a website maker and it is becoming pretty good
wdym domains are normally free
oh wait
that one which they give you for no reason which doesn't look good
?
Nah companies like 1and1 give you a .com or .co.uk domain free with most hosting plans
and they charge more for it upfront per month
Don't
^
Well you see no good company really wants to see free domains
with ad placement for the company who made it themselves
congrats your website is just as generic as every single portfolio and entrepreneur website ever
That's true
If you follow a template, chances are there's a 100 other people who have used the same one
yes
Nice
Oof
what
sorry write worng
and you can get a proper good game for 40$?
what
Interesting
Why would you do that then
Cool
until the game shuts down
the premium things on websites arent perm
well it is if you are paying for it
Yeah but which one is more useful
Skins
no
So i can make my friends hate me
hello, I'm working on a moderation bot for my server and I'm wondering if there's a reliable way to save files from deleted messages
what
one of two links from the collection never works and the other is unreliable
-owners @lyric hollow
-owners @shell echo
bruh
You'll have to download the attachments as files and store them somewhere
if it is just a message get the message contents
He wants the attatchments tho
-owners 159985870458322944
I think
Super
You can join their server for that
it never works for files that aren't images it seems too
but downloading attachments is ugh
I have a question on discord.js
guild.iconURL = Server Icon
How to change it so it also be like a gif if a server has a gif icon?
Doesn't it already do that anyway?
lol?
not in my case
hmm
lolololol?
it doesnt work for me
hmmm?
hmlolmm?
@knotty fiber suggestion (not criticizing anything, it looks nice) - but maybe put the date in the footer
it looks better there 9 times out of 10
JS - Canvas
Python - PIL
or sharp
oki
for simple image compositing, sharp is the better option
canvas is best for drawing and programmatically generating an image
although
to use a link
thank you guys
@knotty fiber so i did "npm install sharp"
Now wat?
I dont know how to use it
read the documentation
canvas is best for drawing and programmatically generating an image
@quartz kindle also jimp and graphics magik
and canvas contructor is a hacky easy way for canvas :p
jimp is about 20x slower than others because its written in pure javascript
ill problably use canvas constructor then
jimp is about 20x slower than others because its written in pure javascript
@quartz kindle idk for me is fast as fuck boi
alright I am still so confused, I am defining an object with a value as true, but its saying its undefined
and I have no spelling errors as I can tell
lol?
what is a good way to target memory leaks?
i know i have one but i can't for the life of me figure out where it could be coming from
console.log(data);
console.log(data.useEmbeds);```
first make sure your leak is in fact your code, and not just your discord library's caching lol
its not memory leaks, its just how the library handles caching
when your program starts, maybe wait a minute or two, cache memory usage, then log in, wait a while, and cache again, see how it changes
it caches EVERYTHING by default, to avoid hitting the discord api as much as possible, and to make it possible for you to access post-mortem data, such as deleted messages and such
just a suggestion
gotcha ty for the explanation!
how many guilds and users does your bot have?
let me check
it's over 9000 
also, when you say memory leak, how much ram do you have in the first place
dude
or how much is it using
over 9k bytes

lmao
oh lol
i have 8gbs of ram
so then how much is it using
all of it
2+2 equals 4 quick maffs 
h
then it auto restarts
i think it has roughly 20k players
no its turn based combat with reactions/embeds
lmaoo
well, im just gonna say this, my bot is in 2300k servers, and using an unmodified discord.js with disabled events and disabled message caching, and basic cache sweeping, its memory usage reaches about 600mb
while with my modified discord.js framework, it only uses 60mb
2300k 
wow
tim advertising his modified djs fw
oh
Tim what did you change?
anyhow
depending on what your bot needs, there is a LOT you can do
to reduce discord.js's memory usage
without all the unecessary caching and stuff
but its not that simple
and it might break some parts of your bot
or need workarounds
h
making a starboard bot i need to keep all my messages 😔
im not intentionally advertising, im just using it as a real life example of what can be done
do the maxlisteners warnings actually matter? i stop every collector i create when im done with it
they do matter
ikr tim im joking, semi drunk atm 
when discord.js creates a collector, it internally sets the eventMaxListeners to +1 and then back when it ends
if youre getting maxlisteners warnings, it might be something outside of discord.js's control
but that by itself will not give you several gb or memory leaks
Tim could you help me with an issue I have found?
@crimson vapor that usually happens when the data is not actually accessible yet, like in a promise or something
can you show the code?
yeah one sec
@near ether the first thing you should do, is look into discord's intents and see if your bot can use them
intents are used to tell discord to only send you the packets that you actually need, instead of everything
but you need to check what kind of data your bot depends on
almost everything related to it uses reactions
const guildModel = require('../../models/guilds/Guilds'); //define the mongoDB model
const _guilds = await guildModel.findOne({ guildId: message.guild.id }); //find the data with the ID of the guild
if (!_guilds) return; //if no guilds, return
console.log(_guilds.settings);
console.log(_guilds.settings.useEmbeds);
return;``` the console and the code used
check the discord api on intents and study it carefully
another more immediate action you can take, is to enable regular sweeping
which version on discord.js are you on neelio?
and this undefined is confusing because the main version of the bot uses the same exact code
he does because a lot changed in v12
which mongo library are you using? mongoose?
yes
djs v12.0.1, and i use the regular mongodb lib
@crimson vapor https://stackoverflow.com/questions/18710043/mongoose-mongodb-result-fields-appear-undefined-in-javascript
I will read through this to see why it may be an error
its strange because I have not had this error before
@near ether in v12 you can sweep caches like this: ```js
client.users.cache.sweep(user => someFilter) // remove users that pass the filter
client.users.cache.clear() // remove all users
// the above method works for all of these
client.channels // partially safe, channels will slowly recache themselves, but you need to manually fetch it if you want to send messages to uncached channels
client.guilds // dangerous, will break discord.js without workarounds
client.users // safe, users will recache themselves
guild.members // safe, members will recache themselves
guild.channels // safe, channels will recache themselves
guild.roles // potentially dangerous, will recache themselves but might break permissions
guild.presences // safe, will recache itself
guild.voiceStates // probably safe, never tested
channel.messages // safe, can be controlled in client settings
wow you wrote that in discord?
yes?
well it is just a lot to type in a chat
you can make a setInterval that sweeps every 30 min or so, and check your results
oh wow thank you Tim
in addition to that i was reading up on memwatch, do you think that can help?
not sure, never used it
alright
In Discord.js is there a way for a Bot to tell if a person using the command has blocked the bot?
what if they have their dms disabled
that's why you catch
you arent.
that's my point
I never said that was the solution
So ultimately there is no way to stop my bot from getting the DiscordApiError?
Bots, like users, are unable to know if they were blocked by someone else. Unless you react to their message and it errors, but sometimes you can't react, so there is no guaranteed solution
The error is "DiscordApiError: Reaction Blocked". My bot reacts to a user who uses my command, but the user has me blocked. I have the error caught, I just wanted to know if there is anything I could do to pre-empt the error
Or if I'm just forced to always get DiscordAPIErrors
And catch them
well
that's what a catch is for
add .catch(_ => null); at the end of the line where you add the reaction
that way you'll ignore the err
or even better
make it send a message to the channel, that says something along the lines of
"YoU hAvE mE bLoCkEd"
I believe there's an error code for when the bot's blocked, but I don't know if Discord uses it (for reactions).
hey does anyone know if google has any vps services?
ah ok ty

waht
Is there any efficient way to combat the slow await function for getting mongoDB data
Well
Maybe
Just a findOne() searching for a specific ID that equals the member or guild ID
How exactly is the data laid out in the database?
is it indexed? etc etc
how many documents are there?
There would be about 30k for users and I’m sorry that I do not know what you mean by indexed
If the data is not indexed, it means that mongo needs to scan through your documents manually to find ones that match your query
Yes which probably causes the delay
const { prefix, token } = require('./config.json');
I'm using this in a command file.js (not the main file index.js), but i receive an error message in console
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module './config.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/commands/utility/help.js:4:27)
at Module._compile (internal/modules/cjs/loader.js:701:30)
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)
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module './config.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/commands/utility/help.js:4:27)
at Module._compile (internal/modules/cjs/loader.js:701:30)
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)
How can i fix it?
Check that you didn’t leave the file as Config.json
id guess its probably because of the relative paths
and the file.js one is under a folder or something
@crimson vapor No I understand, what do you mean? (sorry, but I'm a beginner)
and the file.js one is under a folder or something
@hushed berry Yes is under a folder
../config.json try
So make sure you spelled it correctly and the path is correct
There's an async version of mongo?
How would I index my database?
So make sure you spelled it correctly and the path is correct
@crimson vapor Yes, the correct name is config.json, maybe the file.js is under a folder. Solution?
in your database manager you can simply hit add index
Simo what IDE do you use, VSCode?
@crimson vapor At the moment, since I'm starting out, I use the glitch website, but once the bot is finished, I would like to pass it on VSCode.
vscode is pretty nice, it also has a build in beautifyer
@summer sedge yes, i know it. but at the moment i need a solution to my problem 😄
Alright, I can’t say I know how to use glitch but on VSC you can tab the requires
Wait you can do that?
Does anyone know that mongodb has a statuspage.io page like https://discord.statuspage.io
Welcome to Discord's home for real-time and historical data on system performance.
from where are you calling the index.js from?
and where is your config located
full path if possible
wait i send a screen
make sure to not send sensitive data
yes
like keys. tokens or your name etc
Social security numbers do get auto censored though
i want to use prefix (located in config.json) in help.js
8362.463.3736.3736
ah shit
yeah then you use
../config.json
where the 2 dots refer to going back a directory
wait not
the path seems
/commands/utility/help.js?
yes
then
use two ../ for going back two directories
../../config.json
^
/path/to/file
This is a path
Thank you all
did it work?
yes
also if you are going to make your bot public
may I make a suggestion?
Create a database (sqlite)
And store your guildid and prefix in there
then in the future you can make other guilds add their data too and then you have a variable prefix
one for each server
Ok thanks
I suggest learning fs at first
fs is not very good for repeatedly calling/writing files
Especially if multiple guilds are going to make the same calls and write their own changes
Ik but it’s something that I liked learning about
i kinda like rocket-store
there's something called "the right tool for the job"
and equally important: "using the tool correctly"
a bad database design will give you as much trouble as a bad json storage design (ok maybe not that much, but still...)
@summer torrent why would it? mongo is a database, not a hosted service
@crimson vapor Sorry I went to eat, yeah you can host mongo yourself if you download it https://www.mongodb.com/download-center/community
@hushed berry i mean this https://status.cloud.mongodb.com
Welcome to MongoDB Cloud's home for real-time and historical data on system performance.
I’ll look into it
It will increase performance as you dont have to send http requests
I'll run a test to see how fast mine is
...for mongodb cloud??
i was talking to nmw lol
o
also, that is just incorrect
mongo doesnt work over http, so it doesnt have to send http requests regardless
Can anyone help me create a bot?
its just faster because it can work over lan instead across the internet
@hushed berry yes i want to add currenct mongodb cloud status to my status command.
Well it works over it's own protocol doesn't it?
yeah
@earnest phoenix people don’t normally help people make bots, they just help with other people’s errors that they do not know how to fix
@earnest phoenix read this https://discordapp.com/channels/264445053596991498/502193464054644737/555644682076684289
So I have a group on a game and I’m trying to create my own bot on discord so I can do !promote name rank straight away
At that point you could use Mee6 or Dyno custom commands, there are definitely more bots but those are the biggest I think
yagpdb has really strong custom commands afaik
I don't use either though so take what I say with a grain of salt 
What do you mean?
So
On a different game
I have a group
There’s ranks in the group
I want to create this command
Like !promote player name rank and it will do it
What is player, name, and rank?
What would the private mean?
File "C:\Users\culan\Desktop\echo\echo.py", line 32, in <module>
bot.load_extension("gennbotlist")
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 625, in load_extension
self._load_from_module_spec(lib, name)
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 584, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'gennbotlist' raised an error: RecursionError: maximum recursion depth exceeded```
you have an infinite loop
async def postservers(self):
await self.gbl.post_server_count(self.bot.user.id, len(self.bot.guilds))```this
????
Normie was the administrators on that bot list are able to figure out why it's in this and echo.py is my bot
Indentation for life
@crimson vapor private is the rank
@earnest phoenix well, you have two options:
- learn programming.
- use something like discord bot maker
?
then check the bots people recommended and join their supports servers
they can help you better
@earnest phoenix so you want a level-role bot?
N
No they want a custom command bot
Does anyone know the possible reason that my bot is not online? The ready event is emitted and my bot is on two shards. I am using discord.js version 12.0.1
Does your project/node die and/or with a message printed to the console?
Hi guys!
@sudden geyser no errors
it just says logged in
which is logged with the ready event
I think i found the reason
only Shard 0 loaded
and Shard 1 didn’t load
any solutions to make it load?
my shard code:
const express = require("express");
let app = express();
const bodyParser = require("body-parser")
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.get("/", function(request, response) {
response.sendFile(__dirname + "/views/index.html");
});
const listener = app.listen(process.env.PORT, function() {
console.log("Your app is listening on port " + listener.address().port);
});
const Discord = require("discord.js");
const manager = new Discord.ShardingManager("./server.js");
manager.spawn(2);
how many servers is your bot in?
use <@roleidhere>
Thanks
not here lol
wrong chat man
Lol.. dev chat f... I thought it's testing 1
Ok so listen
Someone who made a bot wants to get it verified, but cant join the server because his phone is restricted by his parents so he cant add one
Can I vouch for them?
you dont even need to be in this server to add a bot
I don't think
Wrong channel though
You do need to be in the server
You need to be in this server, that's all
you could add the bot as the owner
@lyric mountain 1600
can anyone help me how can i fix these errors easily
stop using glitch
not a solution.
it very much is
invest into a proper domain and a webserver and then you can talk AdSense and SEO
@earnest phoenix Glitch isn’t SEO friendly as it’s an app for making dev, it’s not made for using it in final production
glitch is also most likely on an Adsense blacklist
along with tons of other blacklists
oh
Yeah
ty
Free stuff wont get you very far
best solution here is to move off to a real platform
tons of cheap solutions out there
If you have a real and cool project, you should spend money
You can’t get everything for free
if you have enough visitors to be approved by adsense, you definitely need to move away from Glitch
adsense has a minimum pageview/month requirement
it just a dashboard of my bot and i have no money for spend
then u cant put adsense anyway
these ads make 1 cent per thousand views, u wont make any money
^
ok
Better to make something like a patreon page if you need support from your community
hmm ty
Hello
@earnest phoenix you can use infinityfree
Can someone help me, I am trying to switch to heroku hosting but I keep getting an error
can you just tell us the error?
is it working on your local machine?
what error did you get?
Idk why, but it's tryna install node-gyp
what modules did you have on your bot?
I had tons
What is the version of node0gyp
can you send the error here*
nm i got it
i thought you sent the bot code
integer@1.0.7
it's the module that's causing the error
yes but that's the error you would get
Whaaaa
it's trying to install integer because it was needed by a module and integer needs node-gyp and it throws that error while it was trying to install it
I don't have node-gyp?
try installing it using heroku console
Ok
lmao
bash: npm: command not found
bash?
just run it normally
?
click on open console on heroku
console on heroku's website
and type npm i node-gyp
Not run cosole?
wait I will try
I get the same error

that's heroku run console
console: command not found
click on console under it
I tried that
bash: console: command not found
And for some reason my dyno won't show up either
Where do I do that
It installs whatevers in the package by default
To add env variables go to your Heroku app > settings scroll to reveal config vars and add them there
how did i obtain the value of VcID using this webpage thing again?
room.html?VcID=596690518
@golden condor iirc you are supposed to replace CONFIG_PRODUCTION with something like install_modulename And there should be a = at the end been a while since I've used Heroku honestly but https://devcenter.heroku.com/articles/nodejs-support#package-installation this might help better
Should I use this
"scripts": {
"heroku-prebuild": "echo This runs before Heroku installs your dependencies.",
"heroku-postbuild": "echo This runs afterwards."
}
how did i obtain the value of
VcIDusing this webpage thing again?
room.html?VcID=596690518
@peak venture details please
what are you trying to accomplish
@hoary elm is that right or do i need to do smth else
@pale vessel obtain parameter from VcID
@golden condor that's only if you have a buildscript.
A buildscript?
using what?
express nodejs?
req.query.VcID
imagine scripting a bot
@hoary elm is there any way I can do it please help
I am so confused
config:set NPM_CONFIG_PRODUCTION=false YARN_PRODUCTION=false
Honestly just adding the module name and version to your package and redeploying would probably be easiest.
What did you add?


i so dumb
