#development
1 messages · Page 557 of 1
second of all, please take some simple js classes. because none of that is propper like at all
well. what are you trying to actually do
instead of telling me you want to fix unintelligible code with no goal
Well, there are some calls for a.p but the only reference to the property of a.p is there..
The code currently doesnt work. My friend has the original code and hes being a dick
Its not that I don't know JS. It's that I have never used it in a browser environment, and this is one of those cases that old code styles doesn't help me out.
well no matter where you do it and no matter what version it is you shouldnt defining something as an argument in a function so uh i have a feelin ur trollin lol.
Trust me, I have a feeling that I am being trolled, though I am just trying to fix this and get it over with.
well
ignore the code you've been given
and tell me what you're trying to do
and then we work from there
Well, the entire goal was to have a webpack for a bot page using front-end routers https://visionmedia.github.io/page.js/
I'm gonna take my time and either figure out what broke or just end up rewriting it as I mostly know what was wrote.
Uglified/minified code are hard to look at, may take time
You prob have better luck of just asking for the src code or try to replicate the behavior, minified code will give you a headache
It's also good to use real names for functions or vars
Yeah, lesson learned. Don't ask snobby friends for help.
Readability is amazing.
readability doesn't really matter in production
@amber fractal Thats what Ive been doing, just been doing F2 in visual code to rename things as I remember what they do
Webpack has plugins to uglify or minify to reduce production payload size, never meant to be used for debugging, unless there's a src map
@keen drift Do you have something similar in your pack? ```js
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(t, "__esModule", {
value: !0
})
Yes most likely
Just asking because I know this is webpack, but what it does is all I know its loading modules (obv.)
is there only one bundle file
Webpack also have a plugin responsible to transpiling to browser supported js
Theres two JS files, the first one seems like it just pushes css to the page and body form.
The second one is the one i was trying to decode.
if it looks like a bunch of garbo, with no human context info, like familiar strings, prob looking at wrong one
Yeah no, that's prob not the main app logic
looks more like webpack setting things up
Yeah this thing is filled with immediately executed functions.
Also this stupid thing: https://awau.moe/c76b5d.png

so ive got this event, and it only works in my server. not another server. i tested by putting a channel with the name in another server and it doesn't work. heres my code:
bot.on("guildMemberAdd", async member => {
let welcomeChannel = member.guild.channels.find(name => name.name === "welcome-goodbyes");
if (!welcomeChannel) welcomeChannel = member.guild.channels.find(name => name.name === "welcome-goodbye");
if (!welcomeChannel) welcomeChannel = member.guild.channels.find(name => name.name === "welcome");
if (!welcomeChannel) welcomeChannel = member.guild.channels.find(name => name.name === "joiners");
if (!welcomeChannel) welcomeChannel = member.guild.channels.find(name => name.name === "audit-log");
if (!welcomeChannel) welcomeChannel = member.guild.channels.find(name => name.name === "general");
let wc2 = member.guild.channels.find(name => name.name === "audit-logs");
if (!wc2) return;
if (!welcomeChannel) return;
const embed = new Discord.RichEmbed();
embed.setColor(0x63ff0f);
embed.setThumbnail(member.displayAvatarURL);
embed.setAuthor("Member Joined!", member.user.displayAvatarURL);
embed.setFooter(`ID: ${member.id}`);
embed.setTimestamp();
embed.setDescription(`Welcome **${member}** to **${member.guild.name}!** You are member **${member.guild.members.size}!**`);
welcomeChannel.send(embed);
wc2.send(embed);
if (member.guild.id === "458561977212469268") {
member.send("I hope you enjoy this server. Don't forget to read the rules!").catch(O_o=>{ console.log("This user does not have DMs enabled")});
}
});
jesus christ that's a mess
Does anyone know how i'd be able to use mongodb and moment for my cooldown?
you define server
big brain
yes
xD
but thats actually what you do
if something isn't defined then you need to define it
oof
So true
Does anyone know how i'd be able to use mongodb and moment for my cooldown?
why mongo for cooldowns
umm thanks ? xD
ok
@fallen arch they did help you, the issue is pretty self explanatory if you know the language and you didn't just copy and paste random code
i never copy people
can you send the code you were using?
yea
ok
Also @blazing star I am using mongo to store the message author id and moment is to store the time and also if they try and use the command again before their time is up I can use the moment format
:<
to prevent that
Did I do it wrong
I would use an arrow function
but why is this not working
This Is What Happens When I Do !join
can you get the stack trace
how do u umm
var server = servers[message.guild.id]
doesn't he need that defined as well
please tell me
I don't see where servers is defined at all
same
or does it not need to be
inb4 globally
i gave the code can u fix it for me(its ok if you cant i am just asking)
No
kek
We can't
Ok
we can only help
Yea
wait this is what it shows in the console -(node:14032) DeprecationWarning: Collection#filterArray: use Collection#filter instead
Yea xD
amazing what the error can tell you
xD
Ikr
yes
So my question was never answered how could I make a cmd cooldown using mongodb and moment?
you could store the timestamp when the user executed the command
do you really need mongo or moment
neither is really needed
an in memory map would work with simple timestamps
Grr
i am such a noob
yes
Nvm
ok
Ill ask elsewhere
i am soo noob and u guys pros
ok
i even dont know how to define the server
unnecessary markdown 👏
then why you using it
inb4 code copied
rip
How did you write the rest of the code???
@blazing star the error message is copy pasted
Probably from Plexidev or smth
Probably commando yeah
lel
you just define server like you did with the rest of the code
Hm
do you even need the
[]
or servers
can't you just do
var server = message.guild.id
maps are better imo
Hm
no solution ?
Cannot read property 'roles' of null
probably a dm
ensure member exist 
and that is also not how you check if a user has a role, ill let u figure that one out (docs also help)
and your trying to compare a Collection to a possible string
It's pretty obvious that you don't know js or logic
sounds like 90% of the questions in here
is var server = servers[message.guild.id]; suppose to be there
Didn't you code it? Why you asking us 
let x = 1 > 5
Wouldn't this allow me to pick a number between 1-5 or
Math.floor(Math.random() * 6) + 1
adding one 
I think you gotta do max - min inside
I may have done the last one wrong

I can't remember how I would do it
I think random * num works too
Math.floor(Math.Random() * (max - min + 1)) + min;
¯_(ツ)_/¯
no
yeet
If im trying to kill a running child process would I send SIGINT or SIGTERM?
@uneven laurel single role, has, compare by id
then has, name
const role = guild.roles.find(r => r.name === "roleName");
yeah
You guys Fixed Your Problems?
https://hastebin.com/wuvapakena.coffeescript DB.js
https://hastebin.com/xuximifowo.js rep.js
I want to check if message author's id is in the db then check how much time they have left on the cool down
then send an embed telling them how much they have if they try and use the cmd again before their time is up (Also don't think I did the time thing right)
Hi people 👋 Are there any devs here who could help me with my bot?
@livid swallow sure what library you're using?
This is my first ‘production code’ type of bot and I need dome feedback.
I’m new - so feedback helps me improve my coding skills
yeet
client.loadUserData = (message.author.id, data => {
if(data.rep_cooldown < 0){
var twentyfourh = new Discord.RichEmbed()
.setTitle(`Wait!`)
.setDescription(`You have to wait ${moment(data.rep_cooldown).format('MMMM Do YYYY h:mm:ss a')}`)
message.channel.send(twentyfourh)
}
})
})
is this how I would check if data.rep_cooldown is greater then 0?
data.rep_cooldown === 0 would work as well but yes
why don't you guys make it so @gilded plank send embeds instead of plane messages
oooooooh
Hi people 👋 Are there any devs here who could help me with my bot?
what library
What language are you using
javascript?
Presumably js
unfamiliar.. but you may be able to do
let msg = message.channel.send('The response');
then msg.delete()
@earnest phoenix send your code and error
Btw it'a an looping
for(let x of channels){
<option id="<%=x.id%>#<%x.name%></option>
}```
Using ejs
I tried to get the selected channel
new Date()?
Hello I have a question with an indexOf I can replace a choice in a array but it is possible to replace all these things ex:
Index of
To replace any indexsof
How should I do it?
@fallen arch you must have a bot and apply here on https://discordbots.org that
that's it
Thats What I thought. thanks
Welcome
yes
how do i fix this xD
show code
ok
wait
Ok
wait if i upload the bot does that mean it will be hosted too
@R4A 乄 Hydrox#8573 Umm Hello
?
you didn't check it?
wait
umm ok
What is servers you haven't defined it I think
wait
see this
Hello I have a question with an indexOf I can replace a choice in a array but it is possible to replace all these things ex:
Index of
To replace any indexsof
How should I do it?
why you bully me
@lofty hamlet can you give an example?
Hum
fonction.channellogs(message)
array = message.content.split(" ").slice(1);
let xoargs = array[0]
let xoargs1 = array[1]
if (!xoargs) return message.reply("Erreur :Croix: : `Entrez le nom du pokémon à remplacé`")
if (!xoargs1) return message.reply("Erreur :Croix: : `Par quel pokémon voulez-vous le remplacer ?`")
//console.log(Dresseur.Sac.includes(xo03))
if (Dresseur.Sac.includes(xoargs) || (Dresseur.LSSac.includes(xoargs) || (Dresseur.SSac.includes(xoargs)))) {
Replacing = Dresseur.Sac.indexOf(xoargs)
Dresseur.Sac[Replacing] = xoargs1
var embedGlobal = new Discord.RichEmbed()
.setColor(embedcolor)
.setTitle("Pokémon remplacé")
.setThumbnail(message.author.displayAvatarURL)
.addField("Remplacé : ", xoargs)
.addField("Par : ", xoargs1)
.setFooter(client.user.username + " - by Nebulus")
.setTimestamp()
message.channel.send(embedGlobal)
}
else if (!Dresseur.Sac.includes(xoargs)) {
message.channel.send("Erreur :Croix: : `Pokémon introuvable, sois vous ne l'avez pas capturé sois vous l'avez mal orthographié ex : ?setc Roucool (Normal)`")
}
}```
My command test for replace one pokemon of my array
But this commande replace just one pokemon but if i have two even pokemon this command replace juste the first in the list i want thans this command replace all of this pokemon write
You understand ? ^^' @spring ember
for (let index = start; index<start+amount; index++){
array[index] = something
}
@quartz kindle Very sorry for the ping, remember the API you helped me set up? How would I restrict it to a certain role on discord? Would I have to create an API key for those?
And how would that be implemented into the API?
Just do multiple indexOf?
Yes
I don't really understand what are you trying to do here @lofty hamlet
but indexsOf (Exemple) don"t work
How i do ?
dondishAujourd'hui à 17:50 Just do multiple indexOf?
yES @spring ember
@lofty hamlet just do a for loop and do if (array[index] === something) {doSomething()}
Ok thanks good idea
Hum
How i do loop @spring ember in discord.js 🤔
It's very possible ?
if(!message.guild.member(message.author).hasPermission("MANAGE_MESSAGES"))
if(!message.member.hasPermission(['MANAGE_MESSAGES'])) return message.channel.send(` You are not permitted to use this command`); or something like that assuming you're using djs
@uneven laurel
@split hazel message.member.hasPermission('MANAGE_MESSAGES') no need for an array
also no return
why no return?
Okay so, I am trying to make an API Key System for my Glitch API. They have to specify their API Key in the URL /api/fact/{APIKEY}. All API Keys are stored in an apiKey.json file in the Glitch Project. I want my Patrons to only be able to get an API Key which I already know how to do. So the only thing left to do is find a way to add the API Key to the apiKeys.json file in the Glitch Project from my bot wich is not hosted on glitch, any idea how I could do that? PING ME WHEN YOU RESPOND PLEASE
@earnest phoenix an API involves many different kinds of operations, its not limited to just requesting data. you can easily send data to an API using a POST request for example
you just need to create another endpoint, for example /api/create and have it create an api key and store it in the json file when you access the url
you can have your server create the key itself and send it back to you as a response, so you know the key you just created
to avoid anyone being able to create api keys, secure that endpoint with a special api key that only you know for example, which can even be hardcoded
Was thinking of that however, how would they send the api key back to that user?
Webhook or something? Idfk 😂
you want the user to be able to create a key themselves?
or you want to create one for them?
if you want them to be able to create it, should they be able to create as many as they want? or limit to 1 per user for example?
how do i grab data if the json data is in [{}], or will it be the same thing as doing it if its in {}?
You can use dot notation for an object
the same way you would get an item from an array
ok, thanks
client.loadUserData = (message.author.id, data => {
if(data.rep_cooldown < 0){
var twentyfourh = new Discord.RichEmbed()
.setTitle(`Wait!`)
.setDescription(`You have to wait ${moment(data.rep_cooldown).format('MMMM Do YYYY h:mm:ss a')}`)
message.channel.send(twentyfourh)
}
})
})
Is this how I would check if whatever is in data.rep_cooldown is greater then 0?
🤔
Greater than (>) 0
tthanks
Also will the cooldown remove it's self from the db after the time is up or will I have to remove it myself?
1 > 0 true, 1 < 0 false, 1 > 1 false
Would it matter?
My cds arent deleted
Because if the time is > whatever the cooldown time was it would run anyways and auto create a new cd in its place
Ok so after it reaches 0 the person can use the cmd again
that depends on how your database is structured
Well mine is different
I will show
Mine is an object that stores time and a spam counter
Not to mention the way i handle it is way different lmao
the DB_functions.js
is the file that has the data and such
the DB.js is how the Database is setup with the loadUserData and writeUserData
are using any timer function or data type?
from what i can see, you're just using static values, and only increasing the cooldown, and never reducing it
the database wont countdown for you
unless it has a specific timer data type or something
if your database doesnt have timer functions, you cant use countdowns
you have to use another method, like comparing timestamps
How can I make a timer function?
I prefer to usse the DB way instead of comparinng timestamps
check if your database supports some kind of timers of expiry dates
Hello I’m a noob at coding and I need help,I don’t know how to work with ms npm
i've never used mongo, but im assuming yes, it appears to be an index
Ok
@barren brook what do you mean how to work with ms npm?
Th ms npm for js
well, what have you tried?
Wdym?
He wants to know how have you tried using ms I think
^
Also
is the createdAt thing necessary for the function?
Oh wait
Yea it is ok
doesn't
new Date()
give you the current date?
yeah
Ok
client.loadTimerData = (discordID, callback) => {
db.users.createIndex( {id: discordID }, { "createdAt": new Date() }, { "expireAfterSeconds": 86400 } )
callback()
}
So I could do something like that?
something like that yeah, then check if the index still exists before running the command
it should automatically delete itself after it expires
client.loadTimerData = (discordID, callback) => {
db.users.createIndex( {id: discordID }, { "createdAt": new Date() }, { "expireAfterSeconds": 86400 }, (err, res) => {
if(err) client.log(err);
callback(res);
})
}
I updated it
to add an err check
Also ok
I will have to find out how to see if the index still exists
I think I can use getIndexs()
Not much description on how to use it though
https://paste.tscforum.com/yxnwhdglcu.coffeescript DB.js
https://paste.tscforum.com/pfxwgvgsmd.js rep.js
Is this how I would do it tim?
i havent used mongodb before, so i cant say much about your code, but it looks alright, try it out and debug it if needed
ok
hi,
i am trying to send my server count to discordbots.org. i understand how to send a post request with certain parameters and headers and i know the post request i have to send to /bots/{bot.id?}/stats. i also have my API Key for those calls. but i don't understand where does this key token go. into the headers of the post call?
yes
'Authorization': 'Basic ' + new Buffer(username + ':' + passw).toString('base64')
}
this?
and no username?
yes
thanks! this confused me
https://paste.tscforum.com/jfrsvyvard.coffeescript I do not understand....I don't know where rep is undefined at since I use it a lot
But I think the problem is the commands are not loading
But I don't know why they aren't
loadCommands.js:29:27
Yea
whats line 29 in that file?
I don't see anything wrong in that file
It is how it should be
if(client.commands[message.content.split(' ')[0].replace(client_settings.prefix, '')]) return true
how would I get it to show how many servers my bot is in on my dbl page?
what about anderson.js:15?
@slim heart I tried I don't understand it
dont understand an api, read the docs of said api 
im using js do I go to javascript
well, what do you think 
if(client.commandExist(message) == false) return
@quartz kindle
that is in my anderson file line 15
you can just do !
I know
if(!client.commandExist(message)) return
dbl.webhook.on('posted', () => {
console.log('Server count posted!');
});
if I add this will it show on my my dbl page?
no 
dbl.on('posted', () => {
console.log('Server count posted!');
})
what about this
not the page
I want it to the dbl page
yes
Then look at what JPBBerry just showed
edit the bot and scroll all the way down
ok
Why do I have a "Forbidden"?
you tell me
what are you trying to do
Just after adding the music to the waiting list ">add link" I want to do ">play" but he makes this mistake to me
what
Music command...
Sorry i'm french
forbidden usually means not enough permissions
I solved my problem I missed "ffmpeg" and "ffmpeg-binaries"
So im making a bot that you can upload images to, but im getting this error
1: 00007FF627E5121A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF627E2A5B6 node::MakeCallback+4518
3: 00007FF627E2AFA0 node_module_register+2160
4: 00007FF6280BE5F6 v8::V8::ToLocalEmpty+54
5: 00007FFFDEFD1EB9
6: 00007FFFDEFD33C0
7: 00007FFFDEFD9B35
8: 00007FF627E2AE77 node_module_register+1863
9: 00007FF628655782 v8::internal::OptimizingCompileDispatcher::Unblock+60562
10: 00007FF628656C1D v8::internal::OptimizingCompileDispatcher::Unblock+65837
11: 00007FF628655C79 v8::internal::OptimizingCompileDispatcher::Unblock+61833
12: 00007FF628655B5B v8::internal::OptimizingCompileDispatcher::Unblock+61547
13: 0000010D5F25C5C1```
anyone know how I would fix this?
what language
uhh I cant send it all but 1 sec
const Discord = require("discord.js");
const { promisify } = require("util");
const readdir = promisify(require("fs").readdir);
const tokens = require("./tokens.json");
const settings = require("./settings.json"); // eslint-disable-line no-unused-vars
const client = new Discord.Client();
client.commands = new Discord.Collection();
client.memes = [];
const commandFiles = fs.readdirSync("./commands").filter(file => file.endsWith(".js"));
const log = async (message) => {
console.log(`[${new Date().toLocaleString()}] - ${message}`);
};
const init = async () => {
for (const file of commandFiles) {
const command = require(`./commands/${file}`);
client.commands.set(command.name, command);
}
console.log(`Loaded a total of ${commandFiles.length} commands.`);
const evtFiles = await readdir("./events/");
evtFiles.forEach(file => {
const eventName = file.split(".")[0];
//log(`Loading Event: ${eventName}`);
const event = new (require(`./events/${file}`))(client);
client.on(eventName, (...args) => event.run(...args));
delete require.cache[require.resolve(`./events/${file}`)];
});
console.log(`Loaded a total of ${evtFiles.length} events.`);
};
init();
client.on("disconnect", () => log("Disconnecting..."));
client.on("reconnecting", () => log("Reconnecting..."));
client.on("error", e => log(e));
client.on("warn", w => log(w));
client.login(tokens.token);```
is my main file
huh
can you console.log before all your requires?
eg console.log("requiring A"); const a = require("A")
also try updating node
anything else printed before that error?
nope
what packages are you using?
ill get my package.json
"name": "wii-master",
"version": "1.0.0",
"description": "bot",
"main": "wii.js",
"dependencies": {
"better-sqlite3": "^5.3.0",
"discord.js": "^11.4.2",
"fs": "0.0.1-security",
"klaw": "^3.0.0",
"moment": "^2.23.0",
"mongoose": "^5.4.5",
"parse-ms": "^2.0.0",
"quick.db": "^7.0.0-b21",
"string-similarity": "^3.0.0",
"valid-url": "^1.0.9"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
can you try debugging what causes that error?
wdym
with breakpoints/logging
ill try
hi,
"bot.guilds.size" thats the value i may send over post request to discordbot.org as server count, correct?
Should be
So I'm a beginner at python but I have this weird issue
async with aiohttp.ClientSession() as session:
I'm getting an invalid syntax error at with for some reason
Oh never mind. I got it
The function had to be async
Okay async is confusing me in python
How does one await an async function in the global scope?
Depending on your code, you sometimes don't need async there
I was writing a short snippet that would send a GET http request to an API and return the result
I made an async function that accepts data, makes the requests and returns the data. My problem is calling that function itself
I don't know why I don't grasp the concept of async in python smh
iirc, await should only be used inside async, and async should only be used in async functions
Yes, which is why I think you don't need to async it again unless it's inside async function
I'm not 100% on this myself, I'm only saying what I've heard from others
The problem is that the return type is coroutine
Welp. From my understanding coroutine is like a Task object in C#
And google is of no help since I have no idea what I'm looking for
python coroutines without asyncio seems to be a popular search
Will look more into it
I appreciate your help Deivedux
Found a way to do it I think
loop = asyncio.get_event_loop()
loop.run_until_complete(awaitable_function())
loop.close()
No idea if that's how it should be done or not but it works
Someone know how to make custom commands?
-botinfo @gilded plank
264811613708746752
Luca
0393
Luca is a bot for managing and informing members of the server
discord.js
- or @Luca#0393
158
1
96 Servers
@fossil oxide

@languid dragon 
@bitter sundial 
Invite | Website | GitHub | Support Server
What
Google it
what the hell do I Google tho
Oh. My gosh
markdown

ohhh
okay
you can do it in the desciption
I'll try it, tysm!
only
@burnt holly
Anyone know why my music bot keeps skipping randomly during a song? I've asked quite a few people but they couldn't figure it out.
Discord.js and wdym device?
Skipping the song completely, but its random
I checked with my host etc
Its not them
This started happening recently
Like 3 days ago
Does the next song start?
Yes.
Could be deleting it from however you setup the queue.
Hmm really?
Ytdl right?
we can't help with ytdl
And i get no console errors.
against yt tos
It's a package....
How is it against their tos
Sure you can help lol
lol yeah I'm stupid, I'm going to go now
💯
Theres a reason we need an api key tho
Anyways
Looking this up on their github, i see people had ECONNRESET and their stream crashes
Hmm interesting 🤔
Take a look there see if anything helps you?
Thats quite old tho
These are always the hardest to test/debug because you said its seemingly random right?
You have an api key, yes?
ECONNRESET is a network error
I was thinking it was a network thing
Ah
Yes it skips then goes to next song
Then skips next song
It repeats the cycle lol
network errors can happen randomly
Can you see what the bandwidth limitations of your host are?
Or if they changed recently
Okay ill ask them
What provider do you use?
I can say the name correct?
SyroNodes
Its a friends host
But i think they may be sleeping
You on the small bot plan then?
Its weird they dont give a lot of data about their network
xD
Ok im getting the bandwidth limitations from them
I mean i still dont know if thats even the error
They said i have unlimited
Do you have root access?
let com = [];
com = [];
const commandList = client.comman.get('command')
const commands = client.comman.map(c => {
for (i = 0; i < commandList.length; i++) {
com.push(`${c[i].name} :: ${c[i].description}`)
}
});
console.log(JSON.stringify(com));
``` code ☝
error: https://pastebin.com/LLkFeDJD ;/
@amber fractal Wdym by "root"
Yea
@visual zenith can you log it before you stringify it? see if its the same
Do you have a console to run commands atleast?
Yes ofc
Im gonna assume its linux
Im not glod with any terminal tbh, im just trying to get commands for bandwidth usage 
Thats a game server management panel
Yeah
Can you send a picture of what the console looks like, may help identify it lmao
Blur any sensitive info
Or dont send it
thats an option
try just running 'help' in the console
didnt do anything lol


How about uname -r (it should give you a version if it is linux according to this video)
nope
It may be because no perms
But the thing is this is weird how u need to execute commands
Hym?
U need to stop the bot
go into this other panel
right the command
save it
and start the bot
Idk doesnt work
This host seems weird lmao
xd
Let me just make one thing clear. You're sure no skip/stop command is being used
You got something like const dispatcher = serverQueue.connection.playStream(ytdl... in that code then?
or similiar
Yes
Then you have an error event for it, correct?
.on('error', error => console.error(error));
Yes
Try logging the time of the video, it should be possible, I havent worked with ytdl in forever
Theres probably an actual reason
Im just not the guy to debug it 
Like when you mean the time of the video like how long it is?
Yes
I mean it probably doesnt make a difference
But whenever i encounter an error i just log everything
It has seemed to work atleast lol
But it plays still
Yea
Were the changes applied then
Wdym?
I swear were gonna do all this then someone that is more experienced than both of us will know the reason exactly
@amber fractal its still the same since its an array that has too much items
So it logs a bunch of undefined then?
color: 2003199,
description: "**:CrossMark: | You must be in the same voice channel to skip the song.**",
}}); ```
anything wrong in this
@amber fractal But yea Idk anymore, It could be something hard to figure out lol
@earnest phoenix not syntax wise
means
yep
Idm how else to explain it
You asked if anything was wrong with it, i told you that nothing is wrong syntax wise
How I fix it it
@amber fractal Thanks for the help I'll see if anyone else tags be tomorrow to see if they can help me figure it out
If thats tge same video i watched a while ago, it was just voiceChannel: voiceChannel
So you can't redirect using bot @prime cliff
Does anyone know how to make a VPS using google cloud?
rip
Do I create a VM instance?
idk
@prime cliff doesn't work
What are you even trying to do? @earnest phoenix
redirect a bot invite link to the support server
Erm
then try putting the support server url at the end?
I think that is how you do it
doesn't work
google wouldn't know
...
That is literally the most stupidest shit I have ever heard
Kawaii
Listen buddy...
This doesn't even work.
It doesn't redirect.
and It's straight from discord.
That's how it supposed to work

OK, you try.
Bot's ID:
522771517365420032
Server Link for redirect: https://discord.gg/7r5P5ug
LLol
You were doing it wrong @earnest phoenix
I got it to work
you have to select guilds.join as well along with bot
then have the redirect url
after the bot is invited to the server
the inviter is redirected to the link you put
That should make it work
How would I do it to redirect to my website
Put your websites url in the Reddirect spot
you should be able to add urls
it will have a spot for it
close to the top
then you can use them
but
instead of guilds.join
I think you need to check webhook.incomoing
Okay
that's doing oauth wrong
redirect_uri is for the oauth2 flow
not for "redirect user there after bot is added"
🤷 I was just telling him what worked
but doesn't grant an abusable scope
Never used Identify
any scope besides bot works
didn't know it did the same thing
because those trigger the oauth flow
Ah ok
Also Natan while you are here. Do you know how to setup a VPS using Google cloud?
DO I need to create a VM instance
Do*
/shrug
Ah ok
Does anyone know how much Memory 2 discord bots and a few website would need to Host?
depends how big
I just don't want to spend a ton of money
if it's at state zero, 10mb max
i can't be one to say, i host like 24 bots, 14 websites, 2 bot lists and a couple mc servers on one dedi and its barely using 10% of resources 
What VPS do you use Tony
i use a dedicated server from OVH
I'm using a raspberry pi for a small bot and it's good
@earnest phoenix if you have good internet they're ok
Yes
You spend a good amount of money?
i couldn't ever use my PI since my internet is 1mbps at good times, and it gets sweltering here so cooling is horrid
yeah its $99 a month :L
i don't
oh...?
I am using google cloud VPS
can I have reaction role invite fishy
It gave me 300$ credit
Yea, I know xD
especially the most minimal vm is like $20
yeah that should be enough
I want to get some Google cloud stuff
if you optimize your code
Optimize it how?
Correct memory recycling
only available with some low level lang
Js?
I wonder how much 1 discord bot would take up
if it was rather small
with only like 10-20 cmds
Just go to the folder with the cmd files in it
10 cmds
commands don't matter
i have 14 commands and use up to 1.5gb
wow
uwu
other things come into count
I wish I could get a good vps
xD
Google Cloud is the only thing I can use
rn
Also my bot will only be in one server
it is a private bot
then like a 1gb vps would be fine at most
Ok
command count usually doesn't affect memory usage
bot size affects way more
if you cache stuff, that is
unless your like me and put all your cmds in memory
collections and stuff are probably bad for it i bet
oh ok
The VPS I am gonna use would last me 13 months
in total
if I kept paying
Now I need to figure out how to use itt uwu
i access my VPS via a website
remotely controll windows server 2016 data center all from a chrome book
because i can 😂
i paid like 70 a year for 4gig ram few cores
was a heck of a deal 😂
args.join(' ').slice(22); what is a newer version of dat
@lusty dew honestly aws free tier is prob better
@sturdy delta there's no newer version of args lmao
you're trying to send a string that isn't declared as a string
you can't send ``` on it's own
you must send it like: "```"
i use `${""}Some text here${""}|
id use string concetation
dang that keyboard looks like apple
xd
Hey what service are people hosting their bots on? I assumed Heroku but figured I'd ask
lol yes everyone hosts their bots on heroku
most of us sensible devs use a VPS or dedicated server
@sick cloud you mean a dedicated server of your own or you purchase resource allotment; sorry I am really new to this type of programming. I've only work with web programming.
I mean it kind of makes sense that Heroku is not ideal (when free) and it is fairly easy and cheap to throw together a Raspberry Pi (or superior alternative devices) - another thing I will look into
Hi, are there any devs around? My bot was rejected for not have any functionality- but it does. I’ve documented it in the help file and included a help message explaining everything
like rented
@livid swallow this is not the appropriated channel for that question.
How I can fix this error


