#development
1 messages · Page 1105 of 1
then it would be against tos then?
likelyhood of you doing it? pretty slim
googled this code
I do see they have this https://discord.com/api/v6/streams
await discord.SetGameAsync("Overwatch", "https://twitch.tv/yourstreamhere",
StreamType.Twitch);
dunno how discord.net works but i just googled that
that's just setting the status
ACTUALLY streaming
I want content streaming
sending video
its possible, though undocumented
^
yes
||if you do it, at least dont tell us
||
i dont endorse it, though its a fun project(if you only plan on doing it for research, and not anything with purpose)
if you make a public bot to do it, im pretty sure they'll take it down without batting an eye
hm
Wait is there a way to stream video from a bot because I'd very much like to do that
though i did see 2 or 3 people do it on Dapi
¯_(ツ)_/¯
no
for the sake of argument, there isnt
its undocumented and you should use it
It's in private beta, not available publicly
it may not ever be available for bots
but they arent meant to be
or intended to be used by bots
It's like an uninhabited island, it's there but nobody knows how to use it as an island
nice name
does anyone know how to make a folder in another folder on glitch?
Be helpful
;o
If you wanna make a new file on glitch you click the add file button
does anyone know how to make a folder in another folder on glitch?
@earnest phoenix click "New File"
But please move to a vps asap because glitch bad
make the folder named /<parent>/folder
then folder/folder
ty
that username...
also pls change your username
oh right oops
how can i get veirfied on dbl
@dusty isle 2795
Nice
im tryin to make some code thats essentially for frames in gif1, where gif1 is a gif thats already saved to my computer and is constant, frames in frame list ive created where im creating a new frame list each time the command is run, are pasted in order onto gif1's frames, but i really dont know how to do the bit inside the or statement haha
How can I let a button keep the same size even though im shrinking the browser?
@earnest phoenix
im making an advanced command handler
f(command === 'help'){
Client.commands.get('ping').execute(message, args);
}
i have a file with the info for that command
but it says Cannot read property execute of undefined
i watched a vid and read the docs but cant fix it
anyone?
it means .get(...) returned undefined, which means whatever you supplied could not be found in the collection
You don't even need the if (command === "something") { client.commands.get("something").execute(...) } part. You can just supply the name of whatever the user entered and see if it exists.
or be me
try {
client.commands.get(command).execute(message)
} catch {}
and just void the errors

that looks quite spammy
what does the difference between .setStatus and .setPresence
you can only set the bot's status using setStatus e.g. online, dnd but you can set everything at once using setPresence e.g. activity and status
im making a dice command that rolls a dice with the number of sides that you specify in the first argument
but, the argument isnt being recognized as the second part in the message
var number = Math.floor(Math.random() * args[1]) + 1
message.channel.send('You rolled a ' + number + '!')
is there a reason?
then its not args[1]
?
arrays start at 0

im sorry im stupid dont mind me
args 0
args is an array
args[0]
im stupid okay you forgot to prepare for the fact that im dumb
also check if its a number or not
otherwise that'll error
=roll NotANumber
ez log spam
#development gang
Hello im looking for a good eval command my current one is kinda bad. Thank you 
Well we won't really give you a ready code
have you tried improving it, and/or looking for inspiration from others' functionality
Yes
ok I'm gonna start rewriting my help command from scratch, so if you see me attacking this channel don't worry 😅
see you soon
define attacking
attacking as in:
i know js but i got stuck, i did my research for 30 minutes, didnt find anything and then came here as a last resort
or
im too lazy to try myself and everytime i get stuck i'll just ask you guys to fix it for me
?
Restort
we dont mind helping as long as you try it at least
yikes
@slender thistle want some memes?
#memes-and-media or DMs
dm's, trust me
Sure

No one is going to work for free my man, if you decide to start developing your own bot we are happy to help here in #development
Is that in your index.ejs file
Remove the ./ part in the beginning
still nothing
check dev console
(F12)
and show us the server code
so that we know how your web service is running
@delicate zephyr here is my server https://i.imgur.com/gcIhAUd.png
that's the code, i use express 

So...? 
Whats the folder structure you have currently
Well
All the website is located at /views
views/index.ejs
views/css/plugins
views/js
This is how I would do it
- /
- views/
- public/
- css/
- js/
- index.ejs
and then you do
hmm ok
express.use(express.static(`${process.cwd()}/views/public`))
and then it should be available at
https://example.com/public/css/style.css
I did a buncha code and thought it would work and I tested it and it did nothing, so I went to check the console and there's no error 🤔
well now there is
(node:7836) Warning: Accessing non-existent property 'category' of module exports inside circular dependency
I don't know why it'd say that though
category ain't a non-existent property
prob you trying to access 'category' but it doesnt exist on one of your modules
name,
cooldown,
description,
that sort of stuff
it's in all of them
cant you trace it?
i forgot the trace command for node startup
one sec
--trace-warnings
node --trace-warnings
yeah, that
what is your whole argument line?
erwin he said to ask you cause u know more then him
look thanks for the help but I probably need to stop... I started learning javascript less than a week ago and am trying things I have no idea how to do. I need to start from the beginning and actually learn
so uh
w3school
start from the first page and skim thru them
after that its just experience
i started by trying a new thing using what i just learned
it did end up with 50 shitty poorly written scripts/commands but it was a good practice to fixate the new knowledge @bright dove
knownledge 
oop
Fun Fact*
anyway
do try w3Schools @bright dove
yeeyee
Try w35schools @bright dove .
I'm gonna correct everything you say @opal plank .
I'm foinf to report you to the mods for being out of topic,annoying.
I am the grammar police fools.
Hey
So I have this
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
bot.channels.cache.get("738863158994927637").send(`User with ID ${vote.user} just voted!`);
});
Before you say learn basic js
go on
It's not logging anything in the console either
So I don't believe it's an issue with the bot.channels thing
is your webserver/webhook running?
Yes
on what?
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
It logs fine
go to your bot page, edit, and look at webhook
where are you hosting it?
Locally for now
Do I go to https://whatsmyip.com and use that?
Whats My IP shows your Public IP Address and LAN, including ability to Trace IP and view WHOIS History. View Screen resolution and browser version
anything that has your ipv4
So it is my ipv4
yes
since you using api, i think you should foward those questions to #topgg-api btw
they will know more than i do
no problemo
you should prob use that website up there
It can't detect my ipv4 address
then use another website
or check our router page
usually routers have your ipv4 in display
Is it TCP?
Or UDP?
Or both?
I have it on TCP, is that maybe why??
@opal plank
what
My port forwarding is on TCP
Do I have to put in on TCP/UDP
That's how it is for Minecraft
I'm just gonna try it
Now I just need someone to vote it to test
Theres a test button on your bots edit page
To my console?
I have no idea what I've done wrong
I port forwarded
Added the code
Added it to my bot's settings
Didn't you say it worked earlier?
Nope
It like logged that it was ready
And posted the stats
But the vote event doesn't work
if i have a message.mentions.users.first() and i want to check if it is a bot, how do i do so?
The User class has a property called .bot to see if the user is a bot or not.
so just message.mentions.users.first().bot
would the variable + .bot work as well?
yes, like if you saved it to a variable then did myVariable.bot
Is their any good vps below 3$
.author is an optional User instance, so yes.
alr
optional as in it could or could not be undefined/null
i was more talking about the return part
then yes
Anyone?
i dont got one sorry
for context would if(message.content.startsWith('something')) return; work or do i have to put in all of the other things?
what are "the other things"
kk
because i have a logging system but i exclude a few things so cleaning it up like that would be nice
although I'm pretty sure 'thingbob' is where you'd put your prefix, and in that case you'd want if(!message.content.startsWith('prefix')) return;
because the "!" means "doesn't" basically
so if message content doesn't start with the prefix, do nothing
i have a delete logging system so if the message starts with something i dont like to have in there, then don't put it in there
Does anyone know what's going on?
Oops! Error: Client network socket disconnected before secure TLS connection was established
Do disk storage matters?
Are you going to be using a lot of storage?
And what type of data is being stored? @weak rain
You cant just stop someone from removing it. You need to provide quality if you want them to keep it
Yes
I wanna ask what commands people like most
I added image manipulation
Economy
And much more
And what type of data is being stored? @weak rain
@faint prism i want for bots
Like the project itself?
It really depends on what you include in your project. Usually small projects are really light-weight in filesize
hm
If you're taking about hosting your bot, that is another matter
yes i m doing that
So you're looking for something that will run your bot, but not from your computer? ie: a vps
Virtual private Server
oh lol
And the specs look fine
shivaco uses this too so i think it will be good
as he is mod here and he is experienced
Hopefully
can i host multiple bots on this plan?
will this plan work
@weak rain https://tryitands.ee
Idk
kk
It might not be
hm
🤷♂️
If you haven't copied files between two computers before, I recommend learning how to use a couple tools (maybe from a YouTube video): SSH (putty) and SFTP (filezilla)
wdym
If you want a SCM, then that's a good idea
scm ?
anyone understand this?
It's like taking a snapshot (commit) for your code, so when you change it poorly, you can always go back and undo
no .catch?
Your async thread thew an exception
I mean the error
There is a deeper issue here
what line
68
I dont have an async
msg.channel.send("you need to mention Name,Email,Hobby,Age, and Pet");
or something
thats also a dissabled command?
No perms to talk
did you store the name and email? if yes make sure to encrypt the data
its an dissabled command and why encrypt?
bcs you store private informations?
it warns you that if you input the data your at fault for any leaks of info
this is not how it works
I have a disclaimer
yea but you store the data not the user
while havong a disclaimer is okay, you should still look into encrypting it since its sensitive data
I store the data and the user
and my bot is ment to share the data you put in lol
ohh boy hope you dont get Verified for this bot.
if you get then a Databreach you probably get into some legal trouble
you can
yea but a disclamer is no Free from Jail card if you have a databreach
the only legal issues are if the data got shared without the disclaimer
did you use a database for storing the informations?
someone can still hack into your machine and grab the plaintext data
its not encoded or anything
REEEEEEEEEEEEEEEEE
and for verifying you are forced to have a secure storage
Eeeeeeeeeeeee
well how do I encode it?
how did you store it? if you say Json db GN
json
https://hastebin.com/beqaxemanu.js
can someone import a ban / kick command to my script ive been trying for the past 3 hours but cant figure out
almost 4
no
spoonfeeding is not allowed
here is example for you https://discord.js.org/#/docs/main/stable/examples/moderation
so how do I encode the text?
@indigo oriole Rule 7A exist
try looking up a tutorial on youtube
i did
did you read my message
all are out dated
lol the discord guide is pretty recent
try reading the docs also, they are updated ;)
module.exports = {
config: {
name: "createrole",
category: "info",
description: "Creates roles",
usage: "createrole <rolename>",
accessableby: "everyone"
},
run: async (bot, message, args) => {
if (!message.member.hasPermission("MANAGE_ROLES"))
return message.reply("I m sorry but You need Manage Roles permission to do that!");
let text = args.slice(1).join(" ");
if (!args[1]) return message.reply("Please add the name of the role");
const role = message.guild.createRole({
name: text,
color: "RANDOM",
permissions:[]
})
let serverembed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setThumbnail()
.setAuthor(message.guild.name)
.addField("Name", message.guild.name)
.addField("ID", message.guild.id)
message.channel.send(serverembed);
message.channel.send('ok')
}
}```
Why isnt this working
did you get an Error
What can be the reason for double response
?
do const Discord = require('discord.js');
No nested things nor 2 active seasons
where did you host your bot?
try my idea
what should it do @indigo oriole
I am just testing it in my pc
he did "discord.js" he should do 'discord.js'
rly
yes
o
smfh
In jssj there are 3 ways to make a strig
``
''
""
show your code
let score = lifetime[6]['Score']
lifetime is undefined
console.log(stats)
yes but 1min isend u full code that all work
but this is stats.solo
check dm
if (!Number.isInteger(clearnum)) return message.reply('Please specify a number')
how do i make it detect if arg[1] is a number or not
@ me
return msg.channel.send(
"❌**Please enter a number of messages to clear! [Usage: f!clear <amount>]**"
);
msg.channel.bulkDelete(args[1]).then(() => {
msg.channel.send(`**__Cleared ${args[1]} messages.__**`);
});
.toLocaleLowerCase()
.substring(PREFIX.length)
.split(" ");```
@mild flower use a module call is-number
@blazing ravine dont spoonfeed code
;)
oh ok
k
Hello, can someone create a code for me? Create progress bar download that can use in edit message
Using python
@mild flower!isNaN(number)
yes ik
^
@mild flower use a module call is-number
@earnest phoenix
Hello Guys
I have a questions! 😐
const botconfig = require("../botconfig.json")
const colors = require("../colors.json");
const { promptMessage } = require("../functions.js")
const array = ["🙂", "😉", "😝"]
module.exports.run = async (bot, message, args) => {
const helpEmbed = new Discord.MessageEmbed()
.setTitle("Help Center")
.setDescription('Add a reaction to one of these emojis to reach the help you are looking for!')
.setColor("0x00FFFF")
.setFooter(`Created by HamoodiHajjiri#3886!`, bot.user.displayAvatarURL())
.setTimestamp();
const m = await message.channel.send(helpEmbed)
const reaction = await promptMessage(m, message.author, 60, array);
const result = await getResult(reaction)
await m.delete(helpEmbed)
}``` I have been creating a help command and people have to react to an emoji in order to get a specific help.
How should I do it where if they react with the first emoji, it will delete the help embed and send a new embed?
should I do a function? or
??
just edit it
but how to make the if thing
the if(reaction or something
if someone knows how to do the if statement, kindly ping me.. Ill be waiting
That's too advanced for most of us... no but seriously if you don't know how to write if statements then you should learn the basics of javascript first before making a bot
That's too advanced for most of us... no but seriously if you don't know how to write if statements then you should learn the basics of javascript first before making a bot
@cinder patio I know how man.
But I need help with it
How is it..
if() what. Please tell me how it's supposed to be inside.
And its not spoon feeding. Dont understand wrong
Ok.
``` const warnlog = message.guild.channels.find(name, "logs");
if (!warnlog) return message.channel.send("Couldn't find logs channel.");
warnlog.send(dmsEmbed);```Not working :/
Elaborate
upgrade library
hm this was my old code
now my lib is upgraded to v12
but i was wondering that will this work
but it isnt
@pale vessel can u help me what to do?
isnt it .chache.channels?
its a old code @earnest phoenix
Any errors
when I make a function, it says await is only valid in async function
should I do async function(){}
Yes
Ok Thanks! 🙂
Yes @earnest phoenix if you are using v12, use .cache.find
??????
const warnlog = message.guild.cache.find(`name`, "logs"); if (!warnlog) return message.channel.send("Couldn't find `logs` channel.");
v13?
now will this work
v13?
@feral aspen he is from space
AHHHH
@feral aspen in v13
when i ask something
We use guild.cache.fetch().channels.cache.fetch()
all go silent
__proto__: Promise
[[PromiseStatus]]: "fulfilled"
[[PromiseValue]]: "aaa"``` yeah what is the property for the PromiseValue lol
did you resolved that 
Did you resolve the promise
if(message.author.hasPermissions(manage_messages))
if(!message.author.hasPermissions(manage_messages))
message.channel.send("You do not have permission to run this command!")
message.channel.delete();```
Will the two "if" statements make it so if they have the permission they can run the command, if not, it will send the message.channel.send("You do not have permission to run this command!")
Then that's your problem.
the promise
You do it in the promise
@low trout remove the first if statement and use return on the second one
even with min.default.get('token')
Thanks @golden condor
return min.default.get('token')
VM1808:1 Uncaught SyntaxError: Illegal return statement
return means that the command will not run and it finishes there
I'm talking to Ian456ss
oh
return (!message.author.hasPermissions(manage_messages))
message.channel.send("You do not have permission to run this command!")
message.channel.delete();``` Like this? @golden condor
can some1 help me with args
Yes
Oh wait no
module.exports.run = async (client, message, args) => {
if(!message.author.hasPermission("MANAGE_MESSAGES")) return message.channel.send("You do not have permission to run this command!")
message.channel.delete();
@golden condor I only want it to delete the channel if they have the permission "manage_messages"
@low trout look at what I did
Paste that?
hasPermission()
Oh yeah
Okay. Thank you, @golden condor!
Np
some1 help me pls
@golden condor You mind if I invite you to my testing discord to see if the command works?
new Promise((resolve) => {
resolve(promise)
})
@low trout send me a link in dms I'll be happy to help
That should work
lemme see
why not just await it directly
it's still a promise
why not just await it directly
^^
Wrong one
because it isnt in a async
You need to await it as a promise needs to be awaited
nickname with space not work why
yeah ok await
Can someone help me? I created a support ticket bot, but when people type the command to create a new ticket, it will run it multiple times, and create multiple channels. Here is the code:
@low trout
Yessir
can u help me with args
Once I have gotten assistance for my bot. I need to get this figured out. Sorry.
@golden condor async function get(key) { return await min.default.get(key) } this return's the promise
Then await the function
but the function is not in a async
its not in a event or so
var config = {
"token": get('token'),
"prefix": get('prefix')
}
//
const guilds = document.getElementById("bot-guilds")
const users = document.getElementById("bot-users")
const prefix = document.getElementById("bot-prefix")
const prefixtext = document.getElementById("prefix-text")
const prefixbtn = document.getElementById("prefix-submit")
const tokentext = document.getElementById("token-text")
const tokenbtn = document.getElementById("token-submit")
const client = new Discord.Client()
//
function updateStats() {
guilds.innerHTML = client.guilds.size;
users.innerHTML = client.users.size;
prefix.innerHTML = config.prefix;
}
function updateToken(content) {
min.default.set('token', content)
alert("Token has been updated.\n\nRestart the bot to confirm the changes.")
}
function updatePrefix(content) {
min.default.set('prefix', content)
alert("Prefix has been updated.\n\nRestart the bot to confirm the changes.")
}
async function get(key) {
return await min.default.get(key)
}
//
client.on("ready", () => {
updateStats()
})
//
client.login(config.token)
//
//
//
//
//
//
})```

How do I make it so only specific roles can view the Tickets made in this code?
https://pastebin.com/arPSNUxr
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
who cna help me
var config = {
"token": get('token'),
"prefix": get('prefix')
}
//
const guilds = document.getElementById("bot-guilds")
const users = document.getElementById("bot-users")
const prefix = document.getElementById("bot-prefix")
const prefixtext = document.getElementById("prefix-text")
const prefixbtn = document.getElementById("prefix-submit")
const tokentext = document.getElementById("token-text")
const tokenbtn = document.getElementById("token-submit")
const client = new Discord.Client()
//
function updateStats() {
guilds.innerHTML = client.guilds.size;
users.innerHTML = client.users.size;
prefix.innerHTML = config.prefix;
}
function updateToken(content) {
min.default.set('token', content)
alert("Token has been updated.\n\nRestart the bot to confirm the changes.")
}
function updatePrefix(content) {
min.default.set('prefix', content)
alert("Prefix has been updated.\n\nRestart the bot to confirm the changes.")
}
async function get(key) {
return await min.default.get(key)
}
//
client.on("ready", () => {
updateStats()
})
//
client.login(config.token)
//
//
//
//
//
//
})```
@surreal sage @golden condor not possible because there is no event or so...
Why did you ping me
what exactly doesnt work?
async function get(key) {
return await min.default.get(key)
}```
i have this function
it is supposed to return a string from the min.default y know
but it returns the promise
so without the async and await it still sends the promise
and with async and await it sends the promise
and if i go to my browser in the console and do the command there
it returns the string
what is min.default?
does mindb work async?
ye
did you await the function?
What is sharding
where did you call the function?
@weak rain multiple instances of a bot
more ram usage tho
where did you call the function?
@lusty quest wdym call
you have to call the function somewhere
var config = {
"token": get('token'),
"prefix": get('prefix')
}
//
const guilds = document.getElementById("bot-guilds")
const users = document.getElementById("bot-users")
const prefix = document.getElementById("bot-prefix")
const prefixtext = document.getElementById("prefix-text")
const prefixbtn = document.getElementById("prefix-submit")
const tokentext = document.getElementById("token-text")
const tokenbtn = document.getElementById("token-submit")
const client = new Discord.Client()
//
function updateStats() {
guilds.innerHTML = client.guilds.size;
users.innerHTML = client.users.size;
prefix.innerHTML = config.prefix;
}
function updateToken(content) {
min.default.set('token', content)
alert("Token has been updated.\n\nRestart the bot to confirm the changes.")
}
function updatePrefix(content) {
min.default.set('prefix', content)
alert("Prefix has been updated.\n\nRestart the bot to confirm the changes.")
}
async function get(key) {
return await min.default.get(key)
}
//
client.on("ready", () => {
updateStats()
})
//
client.login(config.token)
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
document.getElementById("bot-token").addEventListener('click', () => {
document.getElementById("bot-token").innerHTML = config.token
document.getElementById("bot-token").classList.remove("click-reveal")
document.getElementById("bot-token").classList.remove("noselect")
setTimeout(() => {
document.getElementById("bot-token").classList.add("noselect")
document.getElementById("bot-token").classList.add("click-reveal")
document.getElementById("bot-token").innerHTML = 'Reveal'
}, 10000)
})
tokenbtn.addEventListener("click", () => {
updateToken(tokentext.value)
})
prefixbtn.addEventListener("click", () => {
updatePrefix(prefixtext.value)
})``` my index.js
how to do thsat?
(not a node app)
how to do thsat?
@weak rain i recommend using it when your bot is in 100 servers +
@weak rain i recommend using it when your bot is in 100 servers +
@surreal sage hm i will
lol
but how to use that
start with it when you reach 1800 Guilds
the discord.js guide can help you
KK
but by default D.js V12 has a Internal sharding manager that does it automatic
@surreal sage i dont see where you call the get function
usually you should do something like await get(key)
if you define the Function async you need to await the promise
im not sure if your confg syntax is correct
if you do console.log(get(key)) what happens?
(comment out the error first)
did you call it before you define the function?
var config = {
"token": await get('token'),
"prefix": await get('prefix')
}
//
const guilds = document.getElementById("bot-guilds")
const users = document.getElementById("bot-users")
const prefix = document.getElementById("bot-prefix")
const prefixtext = document.getElementById("prefix-text")
const prefixbtn = document.getElementById("prefix-submit")
const tokentext = document.getElementById("token-text")
const tokenbtn = document.getElementById("token-submit")
const client = new Discord.Client()
//
function updateStats() {
guilds.innerHTML = client.guilds.size;
users.innerHTML = client.users.size;
prefix.innerHTML = config.prefix;
}
function updateToken(content) {
min.default.set('token', content)
alert("Token has been updated.\n\nRestart the bot to confirm the changes.")
}
function updatePrefix(content) {
min.default.set('prefix', content)
alert("Prefix has been updated.\n\nRestart the bot to confirm the changes.")
}
async function get(key) {
return await min.default.get(key)
}
//
client.on("ready", () => {
updateStats()
})
//
client.login(config.token)
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
document.getElementById("bot-token").addEventListener('click', () => {
document.getElementById("bot-token").innerHTML = config.token
document.getElementById("bot-token").classList.remove("click-reveal")
document.getElementById("bot-token").classList.remove("noselect")
setTimeout(() => {
document.getElementById("bot-token").classList.add("noselect")
document.getElementById("bot-token").classList.add("click-reveal")
document.getElementById("bot-token").innerHTML = 'Reveal'
}, 10000)
})
tokenbtn.addEventListener("click", () => {
updateToken(tokentext.value)
})
prefixbtn.addEventListener("click", () => {
updatePrefix(prefixtext.value)
})``` my index.js
not a node app
run the console.log() below your function and try it again
yes
how tf can it be in line 2? when your function is way below?
did you forget to comment out the line that throws the error?
i guess the issue is how you call the function
@lusty quest can u help me with args
let config = {
"token": `${await get(\`token`}`,
"prefix": `${await get(\`prefix`}`
}```
try this @surreal sage
pls ?
what is your issue @blazing ravine
nick?
i try const args1 = msg.content.split(" ");
args.slice(1).join(" ") but not work too the space with words not stopping
nickname*
this is a fortntie tracker
Uncaught SyntaxError: Missing } in template expression
"token": ${await get('token')},
"prefix": ${await get('prefix')}
add the missing }
i already did
@blazing ravine i dont get where you want to add the nickname
the commands is fstats gokselw solo pc
but when the player name is goks el
[with space in cneter]
or other
not work
when use space in args 1
he using it in args 2
ohh now i get it. yea this is not so easy since your command handler splits every space into a new key in the args array
yes
oh my english is bad
sory d
.toLocaleLowerCase()
.substring(PREFIX.length)
.split(" ");``` }}}} ``` let username = args[1];
let gamemode = args[2] || 'lifetime';
let platform = args[3] || 'pc';
this will not work with spaces
with some workarounds maybe
add the missing }
@lusty quest i already did
does it work?
no
the error?
superbrain can u help me pls ? i tryed 3 hours ;/ not work
Uncaught SyntaxError: Missing } in template expression
add the missing }
"token": `${await get(\`token`)}`,
"prefix": `${await get(\`prefix`)}`
}
try this
same error
@blazing ravine i cant babysit you throu it. i would have to think of a way to fix it myself too. there are so many possible ways to do it
idk how 😦
@surreal sage does your IDE say where the } is expected?
or show the code of your config
ye
var config = {
"token": `${await get('token')}`,
"prefix": `${await get('prefix')}`
}```
wait why does it not escape the input as a string? @surreal sage
@spare robin your detailed Description is to short and your brief description is to long. also the featured servers is formated wrong
?
Ok
@surreal sage got a other idea
tell me
const token= await get("token")
const prefix= await get("prefix")
const config = {
"token": token
"prefix": prefix
}
hmm
its possible that the object dont like that a function is called inside
await is only valid in async function
wrap it into a async function
only in my server
how lol
what node Version did you use? with node 14 it should work this way
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
what node Version did you use? with node 14 it should work this way
@lusty quest this aint node
¯_(ツ)_/¯
¯_(ツ)_/¯
what
ok i dont understand
https://lmgtfy.com/?q=how to wrap it into async function
@delicate shore this doesnt help
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
you could call your DB inside of a Promise this could maybe help
what are you talking abt
How to fix Error: Cannot find module './ffmpeg/Ffmpeg' problem
Install ffmpeg binaries
it doesnt help
The "Servers this bot is in" section is formatted incorrectly.??????
help
@lusty quest
async function get(key) {
await min.default.get(key).then(value => {
return value
})
}```
if i console.log(value) it returns the right thing
how to fix this
but with the return it returns the promise
this is bcs of the scope
the function awaits the data inside of it but not outside of it
throw err;
Error: Cannot find module './ffmpeg/Ffmpeg'
Require stack:
- /home/container/node_modules/prism-media/src/transcoders/MediaTranscoder.js
- /home/container/node_modules/prism-media/src/Prism.js
- /home/container/node_modules/prism-media/src/index.js
- /home/container/node_modules/discord.js/src/client/voice/player/AudioPlayer.js
- /home/container/node_modules/discord.js/src/client/voice/VoiceConnection.js
- /home/container/node_modules/discord.js/src/client/voice/ClientVoiceManager.js
- /home/container/node_modules/discord.js/src/client/Client.js
- /home/container/node_modules/discord.js/src/index.js
- /home/container/discord-bot.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1065:15)
at Function.Module._load (internal/modules/cjs/loader.js:911:27)
at Module.require (internal/modules/cjs/loader.js:1125:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/home/container/node_modules/prism-media/src/transcoders/MediaTranscoder.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:1236:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
at Module.load (internal/modules/cjs/loader.js:1085:32)
at Function.Module._load (internal/modules/cjs/loader.js:950:14)
at Module.require (internal/modules/cjs/loader.js:1125:19)```
how to solve it
?
@thorny moth https://stackoverflow.com/questions/51751964/how-to-install-ffmpeg-for-your-discord-bot
Read that.
tell it to me like im a a idiot
@lusty quest
did you know about scopes?
no i dont
ok
if you make a const value outside of a function the value is global for the entire file. if you make a const value inside of a function its only valid inside of the function
my bot doesnt need ffmpeg, why need install it?
you request it somewhere
You clearly requested/need FFMPEG somewhere, else you wouldn't get the error to begin with.
But I assume you're making a music bot/module. In that case you need FFMPEG.
async is also somewhat different. if you await it the data is valid (your function is async and awaits the data inside of it) you log the value inside the Scope of the Function) but if you dont call the function async it will not wait for the data from the function to get resolved -> pending promise
so?
do you guys also have the problem that your bot does not send newly programmed commands? if so please help me how to fix it
Can we host bots on glitch on VPS
If they worked on glitch, they work on a VPS.
so .. do you have the same problem?
If they worked on glitch, they work on a VPS.
@sullen harness but how should i host them on VPS
livecode?
do you guys also have the problem that your bot does not send newly programmed commands? if so please help me how to fix it
@plain helm you just gave the most vague description of a problem.
and what is the problem then
if i import my project on git hub from glitch will it work?
@sullen harness but how should i host them on VPS
@weak rain
- You create your bot (preferably on your system with VSC, Sublime etc)
- You make sure it all works fine.
- You get a VPS and configure it
- Upload files to said VPS
- Install packages
- Launch bot
@plain helm show your command handler
@tight plinth but there is no problem with coding. My bot was working yesterday. Also I'm not only one to whom it does not work
its a problem with your code
and wdym by "Also I'm not only one to whom it does not work"
but it worked yesterday and I didn't change anything
my bot is hosted on glitch now i m trying to do it on vps
and wdym by "Also I'm not only one to whom it does not work"
@tight plinth that I'm not the only one to whom the new commands don't work to send
what do you use to make your bot
also the old commando works for me only those new from yesterday no longer
what do you use to make your bot
@tight plinth javascript /visual studio/
what do you use to make your bot
my bot is hosted on glitch now i m trying to do it on vps
@weak rain Just copy the code or upload it to Github if you haven't already.
wdym
@weak rain Just copy the code or upload it to Github if you haven't already.
@sullen harness ok
will it work fine?
do you know javascript @plain helm
I'm learning
thats why
If you follow the steps and the bot works locally, it should work fine on a VPS.
first you learn the language
second you do some apps
and third youcan do a discord bot
well, but what I have so far I have well because I've already done it
I have a bot
unu
@plain helm what errors are your console spitting out?
learn javascript, then try to look at your code to see if there is errors
there is a reason if they dont work
its your code for sure
@plain helm what errors are you console spitting out?
@sullen harness I have no problems, it just can't be sent
Then there must be an error somewhere.
Hi, I am using lavalink and I keep getting 429s. Is this permanent or can it be fixed or will it time out
@golden condor you should ask in the jda discord
@golden condor 429 - too much requests
Yeah ik
and yeah go ask in the jda discord
can I have a link?
With this kind of information we can't really help.
@sullen harness I just wanted to know if you had the same problem
Sure
ty
Message ratelimits(creation/editing) is 5/5 right?
per channel
Global being 50/10 and DM 5/5
are these correct :/
@sullen harness I just wanted to know if you had the same problem
@plain helm There is no "same problem" everyone's problem can be caused by countless of different things.
jad
lol
@plain helm There is no "same problem" everyone's problem can be caused by countless of different things.
@sullen harness but I know that it is not globally because I am not able to send to my friend's new commands ... and I also have no problem with bot. There is another problem
Then again, check your error it might be something with your userID function or if you have some special role etc etc. There could be many reasons why it doesn't work for you.
sorry for my english
Then again, check your error it might be something with your userID function or if you have some special role etc etc.
@sullen harness ok I will check this
Guys, I already know where the problem was. My command started with a capital letter ... and it didn't work. When I put the little letter, it's working
bruh
Anyone know of a really in depth nodeJS tutorial? I want to know everything
Like everything
Please gimme I don't wanna have to learn py
Idc how long the tutorial is it could be 24 hours just send it my way
code academy maybe?
look into professional courses
w3schools is kinda cool some of the tutorials are a little outdated tho it goes into details on each aspect tho
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
@pure lion
Css
I couldn't find out how to use a link in css for the background
Lmao
?
Lol
#example-link a {
padding-left: 15px;
background: url(/images/examples/bglinks/pencil_icon.gif) 3px 1px no-repeat;
} ```
Idk why but dark mode fuck it up
@earnest phoenix !important
'-'
you have to put !important after url(...)
*print 1 to 10*
I learnt py :D
Wdym
sry, can I like push information into an array into an other javascript file?
you have to put
!importantafter url(...)
@tight plinth oh k
@midnight blaze wdym
with require?
and I want to push from one into an other
Hey
const DBL = require("dblapi.js");
const dbl = new DBL('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjcyODkxNjk0Njg0MTc2Mzg2MSIsImJvdCI6dHJ1ZSwiaWF0IjoxNTk2Mjc4NTQwfQ.hfH-s19OF83BNX0PPqd6dRmlzQehZafyE6_QDo3TFyc', { webhookPort: 5000, webhookAuth: 'passwd' });
```0 Output, hosting on github
Omg
@finite nimbus GO in API
@finite nimbus delete that
You leaked
NOW






