#development
1 messages Β· Page 1433 of 1
We're not going to stop talking so you might as well get used to it π
I have a game in the bot which needs to show everyone (min 5 people. max 10 people) their role in the game. Is there a way to distribute all the roles without getting denied for api abuse?
you can also wrap the callback methods with promisify
Help with what?
they follow the error first pattern i think
elaborate
Technically yes but that's complicated for nothing tbh.
produces cleaner code π€·ββοΈ
I bet there's already a promise-based pgsql moduile
No point in re-writing history
pg-promise npm i found
How do I send a message including external api?
what does that even mean
If you want to do that then get off Fornite.
shut up
..
I would like to send a message with some api included
you can't "include an api" in a message
so you'll have to be a bit more descriptive.
why do people ask their questions as if they're keeping nuclear launch codes
are you trying to post request an api 
because their bot is going to be doing something literally no one has ever done before and they don't want their idea stolen. Like, getting images from a reddit API for memes. That's super secret. π
lmao
β¨
maybe he found a api that steals nuclear launch codes
I am still unsure what I am supposed to do
No, there is no error message.
no,
simply connect mine api, and submit it again via a message
well we dont know what your api is, what it does, how it works, or what language you're using, or what library you're using, or what you're trying to do
You're going to have to be a lot more helpful in your question if you want assistance.
guys
somebody was trying to make a bot with lua?

no clue
there are actual lua bots
but its less popular to make one in lua
is there a way to get if the bot has a verified tag? d.js
selfbots 
what?
@lusty quest yeah javascript = more functional
js isn't functional
you can do a lot with js
js is just way easyer
yes but js isn't a functional language, languages like f# are
I do not understand the issue
i was kidding because i'm fairly certain you can only get that on a user account
True.
hmmmmm
nevermind
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
How to get bot developer rank there?
here? apply a bot
Oh
if accepted you get the role
I'm getting
I made for the bot
theres this but its not, well, working
my bot has a bug that i don't why it do that, the messageDelete event is triggered 1-2 minutes after and send false informations
how should this work?
grab the amount of servers and see when it was listed and predict if it's verified or not π
do a β¨ houdini β¨
i wasn't able to find the top gg portal docs api whatever it's called but i do remember it allowed to see/get other bots information
hey guys look at my function. My bot only sends out phrase1. Phrase2, 0, and 3 are not being logged or sent. These are the logs i am getting the info from: 22:49:11 | Player "kardooma" (id=14708AD8E49F09EDEB137DDAE29B223E1A7E9CFF pos=<13360.6, 6258.1, 6.0>)[HP: 97.0226] hit by Infected into RightArm(17) for 7.5 damage (MeleeZombie)
could anyone have a look at it? Thanks!
back to normal
certifiedBot yeah
How do I know how many people invited my boat
what library do you use, and what programming language
Name ends with .js, so we can assume d.js + he didn't mention so another thing how we can assume it. But let him respond tho.
You should probably ask the captain that question
How do I know how many people invited my boat pls say
<Client>.guilds.cache.size
anyone?
You can use client.guilds.cache.size
yeah, but still.
if there's a problem with the code he can tell me
Botumu kac kisi davet etmis onu nerden bile bilirm,
You can use len(bot.guilds) since your name ends with js. /s
Lol
client.guilds.cache.size
dOnt aSsUmE tHaNks @umbral zealot
unless you can answer the questions we ask that's all you're going to get
client.guilds.cache.size
:(
why did you paste that here (#development message)
?
hewo pwogam
pwease count bot guiwds uwu
remember guys you always have to use tank u <3 to signify the end your script in TS
the pretty plieas just makes it skip all errors and continue running
that's not good
what about really making a lib in LOLCODE
I kind of want to actually try that now
Isn't it amazing that repl.it has LOLCODE support
So I'm really new to typescript and i did npm i fs trying to import it for reading few dirs but i get this error: https://cdn.discordapp.com/attachments/782215917291044874/785196241230364682/unknown.png

so i need types for each module?
not really
Hi, can y'all help me with translate command, I try to run the bot with this code below and it show me this error without any explain UnhandledPromiseRejectionWarning: Error
if(message.content.startsWith(`${PREFIX}quicktranslate`) || message.content.startsWith(`${PREFIX}qcktr`))
{
if (!args[1]) return message.reply(" please input a language that I translate to ")
if (!args.slice(2).join(" ")) return message.reply(" please input a text or a paragraph for me to translate")
try
{
gtranslate(args.slice(2).join(" "), {to: args[1]}).then(res =>
{
const gembed = new Discord.MessageEmbed()
.setTitle("Translating. . .")
.setColor("RANDOM")
.setDescription("Detect any languages to translate to other language of your choice")
.addField("Result: ", res)
.setFooter(`Requested by ${message.author.tag}`)
.setTimestamp()
return message.channel.send(gembed);
})
} catch(err)
{
return message.reply(err)
}
}
```
it just say error
π€
console log it instead
which lib are you using lol
since you get a trace
@earnest phoenix I use google-translate-api
@opal plank yeah I tried it too but nothing happen
its not suppose to happen
its suppose to log the whole error
that lib is abandoned
or do JSON.stringify(error)
look at the last commit
2017 oof
!invite
are you implying they're smart enough to understand what you're saying
oh good
there is
this is a huge server, its good to test bot stability with big traffic
and try some very stressing commands to check stability too
its just that 99% of the skids just add it here to get easy 100k users

without proper reason to actually be here
i see that but yeah most people dont need that
i find it amusing how people put their user count instead of their guild count in, for example, bot activity
because they inflated it with dbots and top.gg
wait what?
a fuckton of devs do that
putting users in guild count?
oh no
for example, how bots usually use "in n guilds", shitty bots would use "n users" in their activity instead
i do both tho
because the user count is about a hundred thousand times bigger
yeah people do, do that
i rotate you
π€ΈββοΈ
π©βπ¦― ποΈ
for example Wacthing 246000 guilds
no no, just only displaying your users because they're inflated and then bragging about how many users are using your bot
having this amount of guilds is scary
when behind that it's actually like 50 guilds
get caught and you off top.gg
oh

i mean
honestly, guild count and member count don't matter as much
it's the engagement
fake
make trash bots that get popular because they are based around whatever is popular at the time (like among us)
ahh yes grafana. had the idea to make a panel too. but then looked into the influxdb docs and decided to wait
< prometheus
thats really cool but why is uptime in spanish
localization
well
now i will probably wait again bcs i probably start to recode the bot in C# in the next weeks
but the other words are in english
it's based of ip or something in grafana which is stupid
Browser is in english
Browser localization is in Canada.
Everything english.
Except the OS language(which unfortunately is a single version windows), and its pulling from THAT out of all the places
infuriating as fuck
its not even ip based
i have a vpn
it legit pulls ur OS language
lol
use a vps
ok
@opal plank @earnest phoenix thanks y'all
Something.host is vv good if you want hosting either free or cheap
free is never good
I have one last question, it's about the message attachment, I seen people putting a small image next to a title in an embed, how do I write a code to attach an image link like it
That's the author icon
HELP
I've made my bot, I'm hosting it on heroku
Some commands send new data to a file, but after like 24 hours
all the data in the file, I think, gets wiped
how do I fix
dont use heroku
check pins i guess
there's a few good providers pinned, ^
but some well known hosters like AWS,GCP,DO,OVH;Vulture
well then i suggest use a external database, can recomend MongoDB or Firebase
(they offer free Databases)
How would that work
you connect your bot to the External Database and store your data there
I don't think heroku support external databases
what host/whatever it is is that π
well you have to code it yourself
eh it could support mongoose I believe
they allow external DBs
I mean, I'll have to import the commands to connect to the database right?
I think you gotta pay for that feature though, on heroku
I was considering using an external DB
yeah you can use cloud mongo
also why are you hosting it on heroku, it's against their tos
yeah
until they ban your account
you can use something like repl, but it has too many restarts. I use bluefoxhost, it's free same plans are repl and hardly restarts so pretty fine for my bot
or get a raspberry pi / banana pi / nas to run it locally at your home
to host your bot, right?
o
I was planning to get a raspberry pi
Not that I have any idea how to use one
get a starterkit with included SD card and then its just ARM based Linux
there's a guide on anIdot'sGuide on hosting a bot on rasp pi
renting a vps is probably going to be more profitable than buying an rpi
for the first 10 months at max
the electicity they pull off the wall is way below what you pay for a VPS per month
how can i make a would you rather command
does anyone know a package or something
Is it?
make an list of possible questions and then use a Random number generator to generate an index for a question in your list
okay
Pretty sure that's only against Glitch's ToS
grafan
is there a way to change a bots tag?
heroku is not bad, when its just thought for personal use, yes , it will work with databases. but fs write will not work
heroku isnt event meant to be hosting bots dude
its terrible for bots
heroku and glitch are meant for webservers and websites
if i use my 8ball command it says this but how can i make it so it cuts 'h!8ball' at the 'your question'
is there a way to change a bots tag?
need more info
you mean the "BOT"thing?
i mean a normal discord bot
ehm my code is
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "8ball",
description: "There is a big chance I insult you!",
category: "fun",
run: async (bot, message, args) => {
let question = message.content.slice();
if (!question)
return message.channel.send(`Please specify a question!`);
else {
let responses = [
"Yes",
"No",
"Definetly",
"Absoloutely",
"Not in a million years",
"Never",
"Definitly not",
"NOPE",
"Do you expect yes?"
];
let response =
responses[Math.floor(Math.random() * responses.length - 1)];
let Embed = new MessageEmbed()
.setTitle(`8Ball!`)
.setDescription(`Your question: ${question}\nMy reply: ${response}`)
.setThumbnail(`https://media.discordapp.net/attachments/756172813965983842/785216848479387648/unknown.png`)
.setColor(`RANDOM`);
message.channel.send(Embed);
}
},
}
yes
ehm
replace()
if its verified there comes a β
you really should learn js before makign a bot
Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:
- proper syntax
- debuging code
- basic features (vars, arrays, objects, functions)
- read and understand docs
- nodejs module system
As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.
Here are good resources to learn both Javascript and NodeJS:
Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/
Please take a couple of weeks/months to get acquainted with the language before trying to make bots!]
i did give you the answer
ok
btw how to set the status of a bot? It doesnt work
CUSTOM_STATUS doesnt work
why
*listening
wrong
it is
COMPETING too
listening is not available iirc
i remember going on that a while back, one sec
pool.query(`SELECT * lotterystats WHERE ID = ${message.author.id}`, (err, res)=> {
if(res == undefined){
pool.query(`INSERT INTO lotterystats(id, gold, common, uncommon, sr, ur, raidpasses, exp, stamina, rare, bought)VALUES(${message.author.id}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);`, (err, res) => {
if(err) return console.log(err)
return console.log(res.rows)
})
}
let lotteryObj = res.rows[0]
pool.query(`INSERT INTO lotterystats WHERE id = ${message.author.id}(${value}, bought)VALEUS(${number}, ${getValues(message.author.id, lotteryObj, value)})`, (err, res)=> {
if(err) return console.log(err)
console.log(res.rows)
})
})```
kek the fuck is wrong with my code it's undefined but it still goes throughreturn and onto let lotteryObj
anyone know what is causing this?? bot is not responding to any commands and reboot isnt fixing
@opal plank i fixed my problem
nice
does anyone know what I am doing wrong
you cannot return from a callback. you're in what we call "Callback Hell"

callback hell
What you're doing wrong is using a callback-based library π
let question = message.content.slice(prefix.length + 6); i made this instead of let question = message.content.slice();
@earnest phoenix
@earnest phoenix yes
pg doesnt require callbacks
The fuck am I doing wrong then
really?
yes, really
i tried using await and it gave same response
ok
@stark abyss instead of using callbacks you need to use promises. You can't do the second argument with (err, res) => basically
take a look at https://node-postgres.com/
don't think that's true
look at the very first examples
const { Client } = require('pg')
const client = new Client()
await client.connect()
const res = await client.query('SELECT $1::text as message', ['Hello world!'])
console.log(res.rows[0].message) // Hello world!
await client.end()
that's how you do it
oh
You can use callbacks, but yo'ure going to be in callback hell if you need to use more than one query
i see
callback hell is the worst hell for programmers
alright ty I think I understand more now
If you need more info on how promises work check out https://js.evie.dev/promises π
#development message anyone help here π
const Discord = require(`discord.js`);
const { MessageEmbed } = require("discord.js");
module.exports = {
name: `wyr`,
description: `Would you rather generator`,
async run (client, message, args) {
let responses = [
`:a:Lose the ability to speak \n :b: Lose the ability to read`
]
let wouldyourather =
responses[Math.floor(Math.random() * responses.length - 1)];
const wyr = new Discord.MessageEmbed()
.setTitle(`Would You Rather`)
.addField(`${wouldyourather}`)
.setFooter(`React below with a or b`)
message.channel.send(wyr)
}
}
```so i made this (its not done yet) but if i use it it sends this
addField takes two params
also why the - 1
does anyone know how to add roles though a mentioned meber
https://stackoverflow.com/a/5915122 you're doing random array element wrong.
what do you mean
because i used that with my 8ball command o
let addrole = message.guild.roles.find(r => r. name === "muted");
this is old
tho
...which you copypasted from somewhere and you don't understand what it actually does
got it
πΆββοΈ
take a look at https://anidiots.guide/first-bot/command-with-arguments#grabbing-mentions if you're using discord.js
take a look at the stackoverflow answer I sent
yes i did
i tried with that now
π
ok
@umbral zealot it worked thx
Please try to not be insulting or assume people are idiots. Those that are will make themselves obvious soon enough without us treating them as such.
can i avoid having to provide a time parameter for awaitReactions and just let it listen until my message has disappeared
how to show servers on my bot joined...
Yes
responses should be const because it is not changing
It only does that if you specify it so you can omit it
ok
oh really..
Both responses and wouldyourather can be a constant
if i use this js message.channel.send(wyr) .then(() => message.react('π
°οΈ')) .then(() => message.react('π
±οΈ')) it reacts to my own message how to fix that?
let j = 0
array = ["a", "b", "c"]
for (let i=0; i < array.length;i++){
if (i == j){
if (array[i] == array[j]){
console.log(array[i])
}
}
j += 1
}
I guess i should keep this since it works fine
kakakaakkak
bruuh
moji euribek iszhroak
anyone knows a answer????
melka qzure aytya
pass that new messgae onto it
english
is this even a language
You can't chain it like that though
Since message.react() returns a MessageReaction.
does anyone know ytpl? im trying to play songs from a playlist but i keep getting the error that list query is url is null
[MV] IU(μμ΄μ ) _ BBIBBI(μμ)
*English subtitles are now available. :D
(Please click on 'CC' button or activate 'Interactive Transcript' function)
[Notice] 1theK YouTube is also an official channel for the MV, and music shows will count the views from this channel too.
[곡μ§] 1theK YouTubeλ MVλ₯Ό μ ν΅νλ 곡μ μ±λλ‘, 1theKμ μ
λ‘λλ MV μ‘°νμ λν μμ
λ°©μ‘ μμμ λ°μλ©λλ€.
::...
@timber fractal topics:
- proper syntax
- debuging code
- basic features (vars, arrays, objects, functions)
- read and understand docs
- nodejs module system
As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.
Here are good resources to learn both Javascript and NodeJS:
Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/
Please take a couple of weeks/months to get acquainted with the language before trying to make bots!
oh my
im doing a regex match
who do you stan for
why do you have to do a regex search for that
to check if its a playlist?
koas ir menety irojs jaizas
yes
bad
what do you recommend
why cant you just use includes()
okay but ytpl stil says the url is null?
thats n.tag prefixes in #commands , but it shows a couple examples of how poorly efficient regex is
the playlist url
dont use it unless its necessary
got it
checking the playlist thing is okay, but
This the error im getting when i pass that yt playlist link to ytpl
ointment for pain in the ass
??
yeah
Π΄Π°ΠΉ ΠΌΠ½Π΅ ΠΊΡΠ²ΡΠΈΠ½ Π²ΠΈΠ½Π°
umm
@green kestrel
So, I've got this command:
else if(message.content.startsWith(prefix + "purge ")){
const args = message.content.slice(prefix.length).trim().split(' ')
if(message.member.hasPermission('MANAGE_MESSAGES')){
message.channel.bulkDelete(args[1])
const channel = client.channels.cache.find(channel => channel.name === "epic-logs")
const logEmbed = new Discord.MessageEmbed()
.setDescription(args[1] + " messages purged by " + message.author.tag + " in <#" + message.channel.id + ">")
.setColor(15105570)
.setFooter("Bot made by THE Epic Boy#0001", "https://cdn.discordapp.com/avatars/764215200055427102/f6182edce0365fd49a1b412cd6e94cbd.png?size=128")
channel.send(logEmbed)
} else if(!message.member.hasPermission('MANAGE_MESSAGES')){
message.reply(" You need the Manage Messages permission for that command!")
}
}```
Would there be a way to check if the command included no arguments? I've tried but it doesn't work.
Check if args[1] exists
Lemme try that
args[0] is purge
how to make my bot react to his own embed and not to the command?
So would I write it as if(!args[1]){}?
Yeah
Where would I put it?
Better use undefined
i recommend !args?.[1] just incase
node v1.14 feature?
if args is not undefined access the first element in the array
and then the negate operator
i dont think you both understand what i mean
then what do you mean
let thing = undefined;
thing?.[0] // => undefined, fine
thing[0] // => UnhandledPromiseRejectionError
.? no
?.
yes
yes ?.
else if(message.content.startsWith(prefix + "purge ")){
const args = message.content.slice(prefix.length).trim().split(' ')
if(message.member.hasPermission('MANAGE_MESSAGES')){
message.channel.bulkDelete(args[1])
const channel = client.channels.cache.find(channel => channel.name === "epic-logs")
const logEmbed = new Discord.MessageEmbed()
.setDescription(args[1] + " messages purged by " + message.author.tag + " in <#" + message.channel.id + ">")
.setColor(15105570)
.setFooter("Bot made by THE Epic Boy#0001", "https://cdn.discordapp.com/avatars/764215200055427102/f6182edce0365fd49a1b412cd6e94cbd.png?size=128")
channel.send(logEmbed)
} else if(!message.member.hasPermission('MANAGE_MESSAGES')){
message.reply(" You need the Manage Messages permission for that command!")
} if(!args[1]){
message.reply(" You need to specify the amount of messages you want purged!")
}
}```
So is this right? Because it doesn't work. I put the `if(!args[1])` thing at the bottom. Why isn't this working?
my bad, ignore me
Check it first lol
i was fairly certain you couldnt do property of array like that
if statements are read from top to bottom
so it will still try to use args[1] until that last if
Now what the hell
message.channel.bulkDelete(args[1])
What's the sense of checking if args[1] doesn't exist but is needed as parameter? wtf...
Would there be a way to check if the command included no arguments?
return your error message or your function will continue
when i restart my heroku project, the new datas on the db doesnt save
rent a proper vps
anyone know how to play mixes on discord bot?
storage on heroku is ephemeral
what do you mean by mixes
so apparently i found out that my link was a yt mix and not ytpl
this url
is a yt mix
and not a playlist
which wont work in ytpl
How can i grow up my Bot's server some ideas?
get rid of the &start_radio=1
it's still a playlist
and try again
hmm
if it has a &list param, it's a playlist
when getting an user's spotify activity, how can I get the player position ?
nvm im kinda dumb theres timestamps
nop it says its a mix
"Mixes are not supported"
i got rid of the &start
ytpl says its a mix tho
yeah
iirc mixes generated for youtube accounts are private
they're only accessible to the person who it was generated for
π€·ββοΈ
even groovy in that case
@crystal wigeon do rythm and/or groovy have the same songs in the queue as the mix
yes
hm
const res = await pool.query(`SELECT * FROM lotterystats WHERE id = ${message.author.id}`)
console.log(res.rows)
if(!res.rows){
console.log("USER DOESN'T EXIST -- INSERT AND UPDATE")
pool.query(`INSERT INTO lotterystats(id, gold, common, uncommon, sr, ur, raidpasses, exp, stamina, rare, bought)VALUES(499434394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)`, (err) => {
if(err) return console.log(err + " undefined res err")
})
}
even if res.rows is empty it won't do the thing -- doesn't console log
add a console.log above the query to see if the block is being run
well it runs the content after that if statement, so it is being triggered


too bad they dont like devs for their products
hello π
they make everything secure, but then get email leaks, password leaks, hackers and all that nasty stuff

good job
client.on('ready', () => {
setInterval(() => {
dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
}, 1800000);
});```
and then stoopid people like me actually find even more flaws
i have this command and i want to show the shards in top.gg
but show only servers what is problem


what is the problem
the problem is you didn't share code
Lol
events.js
hmmmm


wait a second...
ok mate
what are code u use
what are what?
Ts, but yes
why does my code suddenly give an error: ctx is a required argument that is missing ```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
if ctx.invoked_subcommand is None:
e = discord.Embed(colour=discord.Colour.dark_blue())
e.add_field(name='Item Usage', value='Do /use <item>, to use the item.')
await ctx.send(embed=e)
@use.command()
async def banana(self, ctx):
number = self.newplayer(ctx.message.author.id)
if int(number[1][8]) == 0:
e = discord.Embed(colour=discord.Colour.dark_blue(), description=":error~1: You don't "
"have that item yet")
await ctx.send(embed=e)
else:
e = discord.Embed(colour=discord.Colour.dark_blue(), description='Used banana: That was delicious!')
await ctx.send(embed=e)
amount = int(number[1][8]) - 1
database.connection.connect()
sqlq = "UPDATE Economy SET banana = {} WHERE id = {}".format(amount, number[1][0])
database.cursor.execute(sqlq)
database.connection.commit()
database.connection.close()
indents is a bit effed
I thought ctx.send was enough
like 90% of my other code does
so no solution to play mixes?
I think it's an error in the other commands
im trying rn
I'm pretty sure you should be using the ? in your sql execute thing and pass in amount and number[1][0] in as arguments
Yeah, pretty sure that is still prone to SQL injections
is there a way to exit node process without calling process.exit()?
it doesnt work wth ```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
if ctx.invoked_subcommand is None:
e = discord.Embed(colour=discord.Colour.dark_blue())
e.add_field(name='Item Usage', value='Do /use <item>, to use the item.')
await ctx.send(embed=e)
@use.command()
@commands.cooldown(1, 3, commands.BucketType.user)
async def banana(self, ctx):
number = self.newplayer(ctx.message.author.id)
if int(number[1][8]) == 0:
e = discord.Embed(colour=discord.Colour.dark_blue(), description=" You don't "
"have that item yet")
await ctx.send(embed=e)
else:
e = discord.Embed(colour=discord.Colour.dark_blue(), description='Used banana: That was delicious!')
await ctx.send(embed=e)
I removed the SQL query
still there
error?
the same error: ctx is a required arghument that is missing
I did this now and still same error ```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
if ctx.invoked_subcommand is None:
e = discord.Embed(colour=discord.Colour.dark_blue())
e.add_field(name='Item Usage', value='Do /use <item>, to use the item.')
await ctx.send(embed=e)
@use.command()
async def banana(self, ctx):
await ctx.send("test")
the await ctx.send("test")
so when I do use banana, it gives that error
when I do use, it works
or
can you only have 1 command group in the same Cog?
no
cuz there are 2 and the other one works fine
oh
it's not passing the context for some reason
not really experienced with command groups
just use the api
???
removing the other command group
thats weird
made the other command group work
nvm im dumb
I didnt do djs for a while, can someone help me with this?
message.channel.send("`||PING||`").then(m =>{
let ping = m.createdTimestamp - message.createdTimestamp;
setTimeout(() => {
m.edit(`**πΏThe Ping Is: **\n ${ping}ms`);
}, 1000);
setTimeout(() => {
m.edit(`**πΏThe <3 of Bot Is: **\n ${message.client.ws.ping}ms`).then(m => m.react('β')).then(r => {
r.awaitReactions((reaction, user) => user.id == message.author.id && (reaction.emoji.name == 'β'),{ max: 1, time: 30000 }).then(collected => {
if(collected.first().emoji.name == 'β'){
collected.delete({reason:"test"});
client.destroy();
}
})
})
}, 4000);
})
I do not get an error
it simply doesnt delete it
debug it π€·ββοΈ
is there a way to exit node process without calling process.exit()?
i'm testing matts remote eval to see how many ways i can break it
call a kernel function
but i think you need to build a native dep for that
since it has to use cpp
howum
a really long string of random letters and numbers
make an app
it literally says how to on the docs page
They already have the role
eek
anyone knows how you can implement 2 command.groups in a single cog? discord.py
because its not passing the context. It gives an error on one command.group: ctx is a required argument that is missing, and the other command group works fine
this is the decorator for both groups```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
I did, its a bit ded atm
oh
@tacit sundial you made sure to include self in the commands group right? I have tons of command groups inside one cog
@commands.group(name='test')
@commands.cooldown(1, 3, commands.BucketType.user)
async def test(self, ctx):
# idk put stuff here
^
yeaah @lunar umbra
I have that included
look
This is the first command.group
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
#stuff
@use.command()
async def banana(self, ctx):
#stuff
This is the second one, which works
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def buy(self, ctx):
#stuff
@buy.command()
@commands.cooldown(1, 3, commands.BucketType.user)
async def banana(self, ctx):
#stuff
only one of them works
when I disable the working one
the other one works
I dont understand
OH
u have two functions with the same name
both command groups have a function named banana
but how do I avoid that
since its necessary
because I cant change the item banana
@buy.command(name='whatever')
but the name="test"
do you invoke it by doing /test ?
uh
so how do I make sure that people can do /buy banana and /use banana
if command.groups doesnt work like this, then I have to remove the group and then make it manually detectable, by checking the message content after the command invoke
@commands.group(name='test')
async def test(self, ctx):
pass
@test.command(name='banana')
async def test_banana(self, ctx):
# do stuff
ah for real?
so it invokes when you do /test banana
the test_banana function name can be changed to whatever you want
ah nice, thank you :D
np
from cogs.quest.freewalk_txt.generation import catacombs_floor_entrance py
then gives module not found
its not a module
its a file
how would i return it
take a guess
not using the return
i have it so when i use a command it gets the date it was used
and its like 00/00/00 at 0:00
okay...?
why would you not use return
it's literally for returning
like the name says
all you did was define 2 objects lol
well its not really for me-
okay...?
Why not use return?
just remove "var dateStr =`
yeah it's pretty obvious but i don't see why you can't give them the answer
or rather wouldn't
"take a guess"
explains what they're doing
explains for who it is
i didnt need to guess
i already knew what the issue was, it was a question to view other methods which is why i said without a return.
return doesn't work in eval anyway if they're not using a function
good point
inb4 redirect stdout to a Discord channel
basically just add return ... and then remove return so it's just ... 
oh now i know what they mean
they want to use that date string in an actual place, so they don't want to use return because that'll exit the command or whatever
maybe it's just me that's slow but yeah
xyproblem π§
so yeah declarations don't return the value of the variable, they return nothing
i don't even need to say any more lol why am i here 
TreeMap can only store Objects that implement the Map interface right in java
I don't think so.
If you're unable to provide that info on your own, you'll want to find a partner you can trust to help you verify your bot. This can be a parent, a legal guardian, a business associate, or anyone else you would trust enough to add to your bot's team.
So, uhh π π .. anyone?
hm
what exactly is the problemo
and it has nothing to do with coding lol
should've just sent it in #general
Then again, I doubt a random person will trust a stranger with their personal sensitive information.
Hello how we make it ? we puts the site directly on top.gg something like that I would like to do?
probs lol
The way it's done is via an iframe element
So, use the HTML iframe element in your detailed description on your bot's page.
Oket thanks ^^
Help me CIt didn't work out. π₯
i wonder if you could force the use of js or conditional rendering
by putting an iframe to an SSR'd website
Hummm I didn't get it π
Thanks I managed ^^
I mean it is still 'development' so that's why I sent it here
integrated my old youtube downloader into my bot, instead of using it in python, i just turned it into a command line operation in async
And besides, I thought it's #development not #coding-help π€·
It technically could fit this channel, but it's better to ask elsewhere for that kind of request.
it looks very nice.
thank
inb4 getting banned from youtube

shhh nah 
Like mee6's dashboard
You can disable levels
but now how can i disable levels?
with command
QUICK.DB
Discord.js
have some setting for if levels are enabled and toggle it on/off in the database, get it from the database to see if it's enabled or not
can i see tho?
the code?
I don't use Quick.db myself, but it should be simple setting and getting.
searching for what
You don't need to search for the feature itself.
You need to search how to do the logic behind the feature.
Hence, the example on QuickDB's introduction page may be useful: https://quickdb.js.org/#example
thx
How do I get a mentioned users display name? When I do user.displayName I get an undefined
if(results[0].afk === 1) {
await message.channel.send(`${user.username} is AFK! \nReason: ${results[0].afkreason}`);
}
This is for checking if someone is set to be AFK.
duh.... Shite.
So member.displayName would work.
Yes
Yes it does.
must be hard to type nickname ?? username
inb4 they just rename the variable to member
Thanks mate, just me and my big brain time lol
why no one is asking for discord.js help π
they got scared of monday
oooooooh
Is anyone else experiencing issues with images?
discord is having a stroke
p cikadap
oof
Hey tim
You know about discord.js-l doesnt working with opusscript
It have an error
HUGE error
I tried to do all true in Discord.client settings
But nothing
Error
I cant now sent it sry, bcs deleyed now it
Is your bot verified?
yes
You need to create a support ticket requesting for those intents
a normal development question.....
How can i make an image unrecognizable with OCR
Easiest way so that users wont face any problems reading that too...
return message.channel.send(":x: You aren't the bot owner. The bot owner(s) are: August#6565 and Completely Average Alien#3034.")
}```
Why am I still not allowed to use the command?
@small prairie look up CAPTCHA technology
That seems to make it hard for humans too lmao
some humans are.... dumb
to say the least
@agile lance you're checking if the ID of the author is NOT that equal to "705731402972528690" or "737918277866487928". I assume that's not what you want to do?
I want to check if the id of the author IS either 1 or 2
So use only ==
do &&
not !==
!== compares types
it will never be both of those IDs atonce
== doesnt
What language are you using Zephaniah?
Javascript
Isnt @vale kitejs/opus disconntinued?
&& worked
Haha i get it
How do I make an image embed through a link in discord? Can't find anything (and I don't mean sending an embed through a bot)
And yeah, I get what you mean by captcha not being readable to some. I geuss just figure out a way to manipulate letters in a way that wouldn't make sense to an OCR
opengraph meta tags
That's node-opus
Elaborate
Oh
Oh Damn this seems interesting
Ah
One solution might be to use a very weird font that's still readable to humans. But the more readable it is, the easier for a bot to read it too 
which is also used on mobile chrome to color the top bar
ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
I can create a customized font with my own handwriting but people will die tryna read that
I guess you'll have to live with some people not being able to read it haha, maybe add a feature to re-generate the picture until they can read it?
lmfao
it would be nice if discord allowed embedding recaptcha with the changes to rule channels and all
but recaptcha is paid now
so
doubt it
They always find a way to squeeze money out of things people need huh
If its paid i think they could actually add it lmfao
maybe a server boosted feature
reach 50 boosts and get captcha for your server
Easy money for discord lmao
Would be great for the bigger servers, I'm tired of being spammed by self-bots trying to invite you to their minecraft server
Exactly
10 INVITES = FREE NITRO!! NOT AN IP LOGGER!!
100% VOUCH ^
According to wikipedia the only thing a captcha is, is just a distorted text with a slight gradient background.
used to be in 2006
nowadays proper captchas are everywhere, but silent
they track your behaviour
sites you visit
cough google
they track your cursor movement
Oh google knows more about me than I do
true that
Thats defo true lmfao
Wouldn't be surprised if they have a sample of my DNA somwhere
https://pastebin.com/JS8MRKgs
MinigetError: input stream: Status code: 429
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.
how do i do that
buy a ton of proxies and shuffle through them every time you get ratelimited
oof
at least i don't think so
where do i get proxies
you can search around on google, i wouldn't be able to recommend some because i never bought them
is there another way?
bc im too lazy to retype i'm just going to quote what i said about a week ago lol
honestly small scale music bots are fucked
youtube placed such restrictions that small bots can't afford to go around them
while older bots which grew bigger had enough time to profit enough to be able to afford everything erwin stated
also, no
ratelimits are ip based
therefore you need to change your ip
change your host everytime you get banned big brain
I mean, you could prevent the ratelimit by reducing the amount of requests right? Will probably make the bot suck though.
correct
however youtube is as decisive as a middle aged woman in a mall
they place ratelimits whenever they want to based on your patterns and whether they found out you're a bot or not
making music bots is literally useless now
this tbh
the big ol' bots are dominating these areas
Unless you have some really unique feature or just wanna do a custom bot, Dont do it
hey can someone help like when i just git pull in my vps then my bot automatically restart how can i disable it
is your bot running with nodemon ?
how can i make an async for loop
In what lang?
javascript
Ah sorry, not very good with that. Maybe make an async method with the for loop inside of it?
i wish i could get that bot developer badge
nvm






