#development
1 messages ยท Page 528 of 1
They have many examples on hat
read the docs
@earnest phoenix guildMemberAdd
what about it
anyone know how i can fix this? (im very new to this btw)
And "an invalid token was provided"
oooh like the discord bot token?
yes
is that the whole problem?
mhm
and let me try changing it
okay
when web development goes wrong https://streamable.com/ii8n1
it's not Client Secret
Ye, that means it worked
can anyone else help?
the warnings mean nothing
Np
@earnest phoenix pls
if you dont know what you are talking about dont say anything, that's not his issue
his issues is that the token provided is incorrect
Anyone know what this means?
TypeError: Error when sending eval response to master process: Converting circular structure to JSON
It means you are trying to put an object with reference to itself into json
const a = {};
const b = {};
a.b = b;
b.a = a;```
you're probably returning a library object
eg a member
so, a.b.a is circular
Would this be it?
client.shard.broadcastEval(`let guildDef = this.guilds.get('${config.ids.loungeID}'); let user; let hasRole; if(guildDef) user = guildDef.members.get('${message.author.id}'); if(user) { if(guildDef.member(user).roles.some(r=>["Yagami Premium"].includes(r.name))) { hasRole = "true" } else { hasRole = "false" } } else hasRole = "false"; hasRole;`).then(res => {
@inner jewel
How do you guys keep your bot up and running 24/7?
VPS
do you guys use VPS? If so, which?
Use GalaxyGate lol
Okay, thank you
Samurai, please can you help me? ๐
I'll check into that
but pls dont use ovh
lul
...
why do i keep randomly get these
(node:32238) DeprecationWarning: Collection#find: pass a function instead
well i have no idea where the error is happening
happening in multiple places probably
are you calling Collection#find like collection.find()
yup
o
i have no collection.find
u do
wait, yes i do
lMao
does collection.find accept a callback as its second option 
idk
ive 2 roles here, no clue how to add them though in a member add event
let role1 = member.guild.roles.find("name", "โโโโโโโโโโ");
let role2 = member.guild.roles.find("name", "Player ๐");
ive tried
member.addRole(role1)```
and same fro role 2 and it does not work
https://discord.js.org/#/docs/main/stable/class/Collection?scrollTo=find take a look at this
its worth reading the warning as well
the find role part is ok
how can i see if a message has a link in it
Just see if it has :// ig
Can you fs.writefile on glitch. Doesnt seem like its working
you can
but can you dont use glitch
im using glitch temperally
yes my spelling is trash ;p
thats fine i guess
its good for betas and such
yeah void is in beta
and i want to release it now.
temporarily
@earnest phoenix if you release early
bugs
less servers bc crap
i released yt too early back when i did and it was a slow grower
dont care for now
lmao great bot dev
โค
ill change voids hosting app
if u give me suggestions to where i should put it
vps
free cause im poor
none then
yep lmao
dont make a bot if you cant maintain it
better make only selfhostable then
Python coders, how do you grab an username from a message? for example: !somebotthing wave to @user1! then grab user1 and make a response like Bot: hi, @user1!
someone help me!
(node:332) UnhandledPromiseRejectionWarning: RangeError: RichEmbed field values may not be empty.
at RichEmbed.addField (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/structures/RichEmbed.js:165:34)
at Object.module.exports.run (/app/cmds/8ball.js:20:8)
at Client.bot.on (/app/index.js:39:28)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)
(node:332) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:332) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
have you ever read an error before
the richembed isnt empty tho
js doesnt throw errors for no reason
the name/value of a field is empty
in case you couldn't conclude that after 2 seconds of reading the error
you're probably trying to set the field value with a variable, but the variable is broken/empty
Gotta resolve the promise
you're setting a variable to a promise so you have to await it 
check if you're not setting 500 instead of adding 500
Oh thanks
My bot is online but its no longer responding
no errors or broken code
restart it or check the prefix in your file
its in glitch
it auto restarts
and prefix is fine
i just changed the stats and it changed
but no commands
Well read over what you changed and make sure you didn't do anything wrong like return after it so it doesn't find the rest of the commands, missing } or ) stuff like that
@earnest phoenix maybe ur token is reset
that happened to me
I used glitch and it autosaved too many times
and then discord kicked it from the api
oof
and glitch is not a good vps
if the bot goes online then it's not a token problem
its not even a vps
also it'd return an error
console.log the shit out of that
also help
let member = message.mentions.users.first().username
let secondMember = message.mentions.users.second().username
let numbers = Math.floor(Math.random() * 100) + 0
let loveEmbed = new Discord.RichEmbed()
.setTitle(`The percentage of success!`)
.setDescription(`${member} has a ${numbers}% chance having a lasting relationship with ${secondMember} `)
message.channel.send({embed: loveEmbed})```
how do I get to mentions?
if it goes online, that means it might not be handling messages correctly
Wdym "get to mentions"
@empty owl wdym?
two
it's just message.mentions.first()
but I need two
oh
which you are doinjg?
lol
??????
message.mentions.users.first(2)
You want 2 right?
It's not an index, it's an amount
would anyone be able to help me with locking a bot then unlocking it 1 minute later for certain roles
It returns an array

?
const mems = message.mentions.users.first(2);
const mem1 = mems[0];
const mem2 = mems[1];

well imma just recopy the files into another project ;/
mk
@empty owl basically the .first(2) is the amount of things you're going to get, so it's going to get the first 2 mentions, and then throw that in an array that you can then get from with [index] yada yada. So you're not getting the object with (1) and (2) thats the amount you're collecting
@empty owl i meant like not allow some roles to send messages in a channel then allow them to
use discord permissions
no like not allow them to send in a text channel
no but i want like timing for it
I mean u can add a verify role then
its for a fortnite bot
what do you need a fortnite bot to mute people
fortnut
fortshit
everyone keep saying that about a fortnite bot pog
pog?
pogchamp
pogchamp
LMAOOOOOooOOoOO
@slim heart i want the text channel to be locked so people cant type in it, then open for like one minute, then just close again
why do u want to make a fortnite bot
then m a k e one
i wish i could lol, thats why i came here for help
theres too many
anime
fortnite
gaming
games
fun
utility
bots
music
yup
ban them all
delete them and start from scratch
^^
-ban @ everyone:bots
do I do x-lovecaculate @1 @2
no like what the result of grabbing the shizzle
o
ye
o
you could probably do that idk but that'd be really dumb and if you want to do it right
get the id out of that
and .get the user
o
then + userobj in a message send will end up as an @
what if I only want the username
userobj.username
no
let member = message.mentions.users.first().username
let secondMember = message.mentions.users.first([2]).username
this wont work right?
it won't
no it wont
ok
also you don't need to extract userid from the string
shh
couldnt I just use args?
there should be an example in each of docs assets
instead of mentions
and do like if args = mention, do this
nvm this is so fking hard this concept
let [firstMember, secondMember] = mentions.users.first(2)
ok can i just do this really dumb for you
ok
ok there
um
thats smaller
let [firstMember, secondMember] = mentions.users.first(2)
let user1 = client.users.get(firstMember.replace(/(<@|>)/, ""))
let user2 = client.users.get(secondMember.replace(/(<@|>)/, ""))```
wrong
ooooooooooooooof
that won't even work
MY FUCKING GOD
couldnt I just use .username after first(2)
IM AN IDIOT
first(2) returns an array
works for first()
read the docs
so not for first(2)
i just turned off the most importnat thing for a command handler.
wups
Returns: * Array<*>
The single value if `count` is undefined, or an array of values of `count` length```
yes
first() -> User?
first(1) -> [User?]
first(2) -> [User?, User?]
which is why you can use destructuring for first(2)
ok
like this? js let [firstMember, secondMember] = message.mentions.users.first(2) let numbers = Math.floor(Math.random() * 100) + 0 let loveEmbed = new Discord.RichEmbed() .setTitle(`The percentage of success!`) .setDescription(`${firstMember} has a ${numbers}% chance having a lasting relationship with ${secondMember} `) message.channel.send({embed: loveEmbed})
let a = message.mentions.users.first(2)
let user1 = client.users.get(a[0].toString().replace(/(<@|>)/, ""))
let user2 = client.users.get(a[1].toString().replace(/(<@|>)/, ""))```
here
lol
spoon feeder!
user1/2 are user objects
but ill take it
whats a
no
the array of mentions
that's still useless
it works shutup natan
you're literally doing client.users.get(user.id)
wats a
a is the array of the mentions.first()
ok
no <@ q9u12398e1u2 > is a returned string no?
you're getting the user object, getting it's id, then getting the user object by id, when you already have the user object
there is no user object
yes there is
i dont think?
errors
(node:2632) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined
at Object.module.exports.run (/app/cmds/lovecaculate.js:7:32)
at Client.bot.on (/app/index.js:39:28)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/rbd/pnpm-volume/796e667b-22ab-4154-b10d-18c07f3647b5/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)
at emitOne (events.js:116:13)
(node:2632) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2632) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code```
because you're calling .toString() on undefined
mmmm
aka there aren't two mentions
let a = message.mentions.users.first(2)
let user1 = bot.users.get(a[0].toString().replace(/(<@|>)/, ""))
let user2 = bot.users.get(a[1].toString().replace(/(<@|>)/, ""))
let numbers = Math.floor(Math.random() * 100) + 0
let loveEmbed = new Discord.RichEmbed()
.setTitle(`The percentage of success!`)
.setDescription(`${user1} has a ${numbers}% chance having of a lasting relationship with ${user2} `)
message.channel.send({embed: loveEmbed})```
take my code
get rid of the first 3 lines
it still works lol
if one of the elements of the array is undefined, aka not enough mentioned users, you get an error
well no duh
it's
a) waste of cpu
b) error prone
you gotta check for that but we arent doing that
with the destructuring approach you can handle them being undefined
yeah killing the competition man 
๐
by getting rid of 0.00001% of the cpu 
its a joke dam
gets threatened to be muted over a joke, says its a joke threatener leaves 
oauth2 access tokens last 7 days right?
should I not use cookies then if I want to refresh?
since cookies would have to expire
so for convenience, i wanted to not have to reopen my folders every time i want to update the new changes i made to my bot. so i made a 'crash' command, that can only be used by me. it is supposed to send a message and then crash the bot. so i tried 1) throw error. this basically just threw an error into console and then the bot kept working. 2) use an undefined variable or something else that makes the program not work. this doesn't send the message, even though the message is placed before the undefined variable
discord.js
is there a workaround?
no prob fam
(see i'm not used to js yet XD)
XD. you're amazing ๐
np
hey, does anyone know how to lock a text channel to certain roles then open it for like 1 minute to allow them to type then close it again?
@serene sun thats a lot, what language?
javascript @safe path
im out
ive seen it done in another discord server
python in distance
and im kinda a newbie to coding rip in chat
me too
it's just permission changing. if u search up a tutorial on how to make bots change permissions
but i have no idea. lol
thank you for the suggestion though lmao
ive been having trouble making my bots 'playing' thing say how many servers its in
@vernal basin would this be significant in any way
maybe. i have no idea XD
im more of an algorithm person. i have no idea what all the fancy commands are in discord botland besides send message and read message. XD
oh seems legit
Hello!
Basically im trying to make a bot that does this.
Its basically a reacting/tally bot.
So basically you have a sertain amount of time like 5 mins, to goto a channel called "3 letters", You type the last three letters and then you get put in the sections, so basically if 2 people said " 200" they would get put under the Id of "200" and 3 others said " 313 " they would get put under the Id of "313".
I need help with programming the bot, and i cant develop just cause my mind cant handle it because i work different..
I just want to observe and be thought well doing it with someone.
Pretty much ghosting but tabbing in here and there.
we arent really developers-for-free here, if you want someone to do something well you need to talk to an admin and have them give you access to #434058442764714002
if you need help with programming, then by all means ask away
:/
i mean
I cant handle that stuff with programming tho, im just not good with it.
I dont know why.
My mind cant process it.
I guess.
you could just do a setTimeout or use discordjs's built in timeout
as long as you maintain the scope you should just be able to set it to unlocked outside the timer and set it to locked inside the timer
u get laughBoye from modlogs
Wait so @loud salmon What do i do for someone to come help me for the bot.
talk to a website admin and work out the specifics for a job offer to be posted in #434058442764714002
@earnest phoenix
Can i talk to you because you seem chill, and easy to work with or no.
the website admins have the perms to give you access to #434058442764714002
and they have consulted people on multiple job offers
your best bet would be to talk to Ken#0666
its in the evening where he lives so you have a higher chance of a response
@earnest phoenix ^
Bruh
i hate heroku
first i encounter their "dynamic dyno" system where it flushes local session stores...
so i workaround by connecting my API to firebase...
then the heroku worker self-terminates because the promise takes too long
@languid dragon
i meant dm him...
@fossil oxide not me
does anyone else have an user count display like this
i need a better way to implement this
right now it is flooding audit logs
my workaround is to have it update when there is a display -> actual count difference of 10 users, but then it is not as cool cause it's way slower
what
Hey, when adding a bot to the website, in the detailed description, how would you go about putting an iframe in? Would I just use <iframe src="https://website.com"></iframe>
Yeah
mk

guys help me to implement music playback with c#
@sour pelican
yo
@modern sable
why you randomly pinging people
Don't mention people for help
Wdym the bot is spamming?
when i type messages
it sends messages to me
the paraprotection bot
wtf is that/
Send a screenshot
dms me
post some sc 
oof where can i find good info on how to get voice working on discord
i have this level system but every time the bot restarts the xp resets
let xpAdd = Math.floor(Math.random() * 7) + 10;
let xp = require("./xp.json");
if (!xp[message.author.id]) {
xp[message.author.id] = {
xp: 0,
level: 1
};
}
let curxp = xp[message.author.id].xp;
let curlvl = xp[message.author.id].level;
let nxtLvl = xp[message.author.id].level * 300;
xp[message.author.id].xp = curxp + xpAdd;
if (nxtLvl <= xp[message.author.id].xp) {
xp[message.author.id].level = curlvl + 1;
let lvlup = new Discord.RichEmbed()
.setTitle("Level Up!")
.addField("Congrats to", `${message.author}`)
.setColor("#08ff00")
.addField("New Level", curlvl + 1);
if(curlvl = 2){
message.author.addRole("Level Test")
}
message.channel.send(lvlup)
fs.writeFile("./xp.json", JSON.stringify(xp), (err) => {
if (err) console.log(err)
});
}
@earnest phoenix you need to have a place where you can save your xps
its very hard
to sovle such problems
Use database 
Not that hard
You just have to get used to it
You don't need a special server
Theres free plans
oof
so you rather have your data corrupt rather than learning
text files ๐
I'd go with local db if it's small scale purpose
i mean in fking text files
)
Text FILES
so...
soo...
use databases
i dont know how to use db properly
do research
i can not hep with that sorry
there's plenty of wrappers
if anything there are plenty of json database
that will better ensure integrity than the way you are doing it atm
guys how playing sound works on discord why do i need additional software like ffmpeg
can i possibly do it without that
?
mp3
are you streaming it
yes
and what's the raw format?
discord takes opus
opus, dual channel, and same rate of 48kHz
your lib doesn't have support for streaming audio?
so if i have a mp3 file i first need to convert it to raw then to discord
i am not sure
if you have anything other than opus, than you need to transcode it to opus
oh god
reference your discord lib for what it needs
hi
Yeah the lib supports AudioStream
welp shit
you'll need to compile sodium and opus from source or install them from pkg manager

you prob off running this on windows
yup
ohhh
d.py: i want to have my bot DM the user when they cant speak in a channel, how do i do it?
css: how to override !important;?
(trying to override the dbl colour thing https://derpyenterprises.org/files/4cp8ah.png)
F
embeds broke
!very-important
@safe path Voice or text channel?
yeah but you have to wine it right?
oh
.Net Framework needs wine or Mono
thought it outputs an exe
so do you need mono or wine to run it?
no
what format can it compile to?
dll and exe and on Linux (atleast Ubuntu i dont know about other distros) Microsoft released a .Net Core runtime you can install via apt-get and run any .Net Core project 
huh, but it's a runtime 
i mean the C# compiler is also not completely compiled to computer code but its compiled on runtime in Microsofts own thing
i dont remmeber the name of that
its a runtime tho (i think)
ye boi
If it works on debian it works on ubuntu if it works on ubuntu it works on any ubuntu fork
@keen drift https://i.imgur.com/zquJPb7.png
debian & ubuntu aren't the only distros tho
Most popular ones
ye
with .Net Core they made it possible to run without whine/mono on linux whats nice
yeah it's interesting
but they dropped a lot of good pre made libraries to interact with windows api 
cause it does windows api calls what doesn't work on linux
@slender thistle text
<Member>.permissions_in(<Channel>).send_messages or something similar
<Member> being an instance of Member and <Channel> obviously being an instance of Channel
ok
I'm getting this error while I click on Authorise

Anyone know anything about Redis Server or any other NoSQL databases. About how they could be hacked or information accessed from outside the local machine?
@earnest phoenix why the fuck you pinging the tutorial writers?!
@queen sentinel @earnest phoenix pinged the tutorial writers for no reason
#wiktor9004 mean anything to anyone??
I don't know, just wait for someone to give you an answer
tick tock
The following message was sent to everyone in my discord server before kick/banning them and deleting all my channels and information. I am very patiently trying to figure out two things. Is there any possible way to retrieve any of my data from the channels from discord? How can I prevent this from happening again? Can someon please direct me to the correct channel or server to discuss such matters. I was using a Python Pot and I used Redis (NoSQL) to store my discord key so the key was not visable in the code. The code was available on github. I need to find out what I did wrong with storing information in Redis. The message is quite large I will on ly post what I see as being important.
Helo! im wiktor#9004 and i just ddosed this bot and your server! :) Subscribe to my YouTube channel :D "then it has a youtube address" and come to my house "then it has a google maps address location"
can you make sure you haven't leaked your token
eg pushed to github
and reset the token immediately
I am. The only way it would have pushed to github is through the redis database which I will double check. But I keep that directory separate.
Is there any way someone could access information in a local redis server
no it doesnt
so it's open to everyone?
anyone who would have access to my computer I suppose...but noone does
and the port isn't exposed to the internet is it?
nope
does your bot contains any eval code
like what exactly?
any eval command
no it shouldn't
No most definitely not
sorry...I'm not thinking straight...just woke up to this
but no I would never put that in my code
can users input things?
Yes...I have a database sest up for saving game information....the bot listens for a command then asks the user to type in something then it saves it in the selected column in PostgreSQL
I dunno...I'll have to look over the code...but is there any way to get back my data that was in all my channnels or is that gone for good?
prob gone
alright
:) ha
I usually have very excellent grammar sir!
Thanks anyway for the suggestions.
@keen drift you developer for fishy bot?
ah
{'af': 'Afrikaans', 'am': 'Amharic', 'ar': 'Arabic', 'az': 'Azerbaijani', 'ba': 'Bashkir', 'be': 'Belarusian', 'bg': 'Bulgarian', 'bn': 'Bengali', 'bs': 'Bosnian', 'ca': 'Catalan', 'ceb': 'Cebuano', 'cs': 'Czech', 'cy': 'Welsh', 'da': 'Danish', 'de': 'German', 'el': 'Greek', 'en': 'English', 'eo': 'Esperanto', 'es': 'Spanish', 'et': 'Estonian', 'eu': 'Basque', 'fa': 'Persian', 'fi': 'Finnish', 'fr': 'French', 'ga': 'Irish', 'gd': 'Scottish Gaelic', 'gl': 'Galician', 'gu': 'Gujarati', 'he': 'Hebrew', 'hi': 'Hindi', 'hr': 'Croatian', 'ht': 'Haitian', 'hu': 'Hungarian', 'hy': 'Armenian', 'id': 'Indonesian', 'is': 'Icelandic', 'it': 'Italian', 'ja': 'Japanese', 'jv': 'Javanese', 'ka': 'Georgian', 'kk': 'Kazakh', 'km': 'Khmer', 'kn': 'Kannada', 'ko': 'Korean', 'ky': 'Kyrgyz', 'la': 'Latin', 'lb': 'Luxembourgish', 'lo': 'Lao', 'lt': 'Lithuanian', 'lv': 'Latvian', 'mg': 'Malagasy', 'mhr': 'Mari', 'mi': 'Maori', 'mk': 'Macedonian', 'ml': 'Malayalam', 'mn': 'Mongolian', 'mr': 'Marathi', 'mrj': 'Hill Mari', 'ms': 'Malay', 'mt': 'Maltese', 'my': 'Burmese', 'ne': 'Nepali', 'nl': 'Dutch', 'no': 'Norwegian', 'pa': 'Punjabi', 'pap': 'Papiamento', 'pl': 'Polish', 'pt': 'Portuguese', 'ro': 'Romanian', 'ru': 'Russian', 'si': 'Sinhalese', 'sk': 'Slovak', 'sl': 'Slovenian', 'sq': 'Albanian', 'sr': 'Serbian', 'su': 'Sundanese', 'sv': 'Swedish', 'sw': 'Swahili', 'ta': 'Tamil', 'te': 'Telugu', 'tg': 'Tajik', 'th': 'Thai', 'tl': 'Tagalog', 'tr': 'Turkish', 'tt': 'Tatar', 'udm': 'Udmurt', 'uk': 'Ukrainian', 'ur': 'Urdu', 'uz': 'Uzbek', 'vi': 'Vietnamese', 'xh': 'Xhosa', 'yi': 'Yiddish', 'zh': 'Chinese'}```
```py
for ling in infor:
linginfo = infor["ling"]
i = f"{i}\n{ling}:{linginfo}"```
I keep getting keyError in infor[ling]
print("yo")```
And name your variables properly, will you?
I can't be arsed
Gl reading your code in a month or two :^)
If I have something like:
<input name="test" type="text"> it would post
{ test: "some content" }
How can I make a bunch of inputs post together and have the result be something like:
{ test: "some content", test2: [{something}, {somethingelse}] }
not what I'm asking though
I want to group specific inputs in a form together so they are posted under the same property
you could use the form to submit them to a page which will combine them and then post it to wherever you need it to go
@safe path what's fishy bot
Just a question, for some reason, my bot's status on the site shows as ???, I don't really care that much, I would just like to know why it happens.
because it probably has been kicked from here
^
For what?
In discord js and got this error
Code:
if(message.author.id === "280815367662731266") {
message.channel.send("yeet");
} else
message.channel.send("setting the bots prefix currently not allowed.");
}```
nani
.
hahayes or use aurora
whats that
my indev framework lmao

which only requires commands yet and saves to client in a Collection so not working lmao
but
I'm at the command handler
which is gonna support
flags
noice
a usage string
like
user:user [duration:time] [reason:string]
and automatically check the arguments for validity, aswell as parsing them
๐
and pass that into the command
and into help, just !ban <user> [duration] [reason] gets sent
yes klasa does
but klasa is meh
updates are inconsistent and all breaking
the dev team is just rude as heck
I've been active in the diri server for about half a year; there's a reason I left lmao
same
let's both do one!!
lmao
lol
you're the third one actually
ive been working on it for a while now
ah
you might know him
yea i do
diri shitted on him a lot
I met him actually because they did and I started to question it
didnt talk to them much though i think i talked like once
but i have seen them around in other servers
oh dang
yeah
anyways wanna move to #memes-and-media
I'd like to hear about your framework ๐
@tight heath Ok really can't find it lmao, the search bar comes up empty, so I'm not entirely sure what's going on ๐
can you send your bots ID
Can I execute the channel of what my bot in the guild
And example
My bot join a server
And if I create a channel name bot-info
What does not go quick.db
What?
Google?
I can't found the tutorial about this
I wouldn't do that anyway, it's not exactly something people like to happen when they invite a bot, and most people won't give your bot perms to do that anyway
But it just sending a message
what
...
@vivid flax could it be your bot is not approved yet
I know how to code but I dont know how the execute the name of channel
But I don't know which one is my need
guild.channel?
nvm
you want to create a channel or send a message to an existing channel?
Yes
Wwait
No I want to make a bot-info system
If I create a channel name "bot-info" and my bot will automatically send the info in it
Like we said, just send it to the default channel that the invite leads to, there is no need to make a new channel (and most people won't give your bot perms for it)
bot-info in your server, or create a bot-info in the server your bot joins?
bot-info in my server
then use client.channels.get(yourchannelid)
client.channels.get('id of your bot-info channel').send()
But in different channel
Okay that is not how he explained it earlier, why didn't you just say that?
cuz not native
I just want the name bot-info and send
just get the id of the bot-info channel
If I have 2 group
And the first one have the bot-info
And the second too
And if I run it
It will send the info to this 2 message channel
Ohhhhhh
but find is slower than get, thats why its always better to use get if you can
So it will find the bot-info in what server my bot in?
it will find the first one of all servers
i think maybe its better to use filter, wait
same thing just replace find with filter
I am sorry for my poor English :p
yeah its better to use filter, find only finds 1 item
Okkay
client.channels.filter(channel => channel.name === "bot-info") ```
Like this one?
yeah that should work
then you have to use forEach
and send to each of them separately
(or .each if you're using master)
yeah v11
oof
@hard hollow is my bot .w.
cute avatar
im working on too many things at once lmao
since they use semver
im gonna remake it with v12 and use my api instead of internal code
fair but why not just bump dep from 11.2 to 11.4
it will be like half the lines of code or less
paint by my friend
idk why but i wait for the right moment to upgrade everything at once
shitty habit i guess
thonk
maybe windows update trauma
tfw use sudo even when logged in as root
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx : Conflicts: nginx-common but 1.14.0-0ubuntu1.2 is to be installed
E: Broken packages
@quartz kindle wtf lmao
lmao
Im using the python server count example and im getting a name error: bot is not defined. How do i fix?
hmm... i dont have .Bot() in my code (ctrl+f)
.Client()?
client = discord.Client()
ok
'NoneType' object has no attribute 'id'
File "C:\Users\avr\Desktop\DiscordBot-Subway\main.py", line 165, in <module>
url = "https://discordbots.org/api/bots/" + client.user.id + "/stats"```
uhhhhhhh
await client.wait_until_ready() first
And please do it under on_ready event
i dont have a client.wait_until_ready
im gonna double check #312614469819826177
still 'NoneType' object has no attribute 'id'
In Discord.js: So my help command is broken, but idk how to fix it. I think i know what is wrong but as I have said before idk how to fix.
fs.readdir("./commands/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
if (!file.endsWith(".js")) return;
let props = require(\`./commands/${file}\`);
let commandName = props.help.name;
let description = props.help.description;
let usage = props.help.usage
if (!message.channel.type == "dm") {
message.author.send(\`**Commands** \n ${commandName}\`);
} else
message.channel.send("๐ฅ | Check your dm now.");
});
});
}```
The error is:
```module.js:550
throw err;
^
Error: Cannot find module './commands/emoji.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at files.forEach.file (E:\STUFF\commands\help.js:9:16)
at Array.forEach (<anonymous>)
at fs.readdir (E:\STUFF\commands\help.js:7:9)
at FSReqWrap.oncomplete (fs.js:135:15)```
@slender thistle i search the file for that and theres nothing, thats what i mean
What file
my code

I mean, add it
do you literally just define url right afer declaring discord.Client()
well i put all the code for it torwards the bottom, after the message settings but before the async def on_ready():
vscode says id: NoneType
url = "https://discordbots.org/api/bots/" + client.user.id + "/stats"
wuh are you using ts
timestamp?
can anyone help me with discord.py?
I'm trying to figure how you can add a blank embed line
I think it has something to do with embed.Empty but not sure
embed.add_field(name="", value="", inline=False)
I tried it
discord.errors.HTTPException: BAD REQUEST (status code: 400)
I've tried adding a \n before the name of a field and no results
yep i have no clue what typescript is
TypeScript is JavaScript but with type definitions
How do i use the discordbots.org widget in my code?
python
Quick.db dont install
@ornate shadow \u200b in string
@safe path Because your bot doesn't get to load the user object of itself before being used
Iโm gonna repost because this was pretty much ignored
In Discord.js: So my help command is broken, but idk how to fix it. I think i know what is wrong but as I have said before idk how to fix.
fs.readdir("./commands/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
if (!file.endsWith(".js")) return;
let props = require(\`./commands/${file}\`);
let commandName = props.help.name;
let description = props.help.description;
let usage = props.help.usage
if (!message.channel.type == "dm") {
message.author.send(\`**Commands** \n ${commandName}\`);
} else
message.channel.send("๐ฅ | Check your dm now.");
});
});
}```
The error is:
throw err;
^
Error: Cannot find module './commands/emoji.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at files.forEach.file (E:\STUFF\commands\help.js:9:16)
at Array.forEach (<anonymous>)
at fs.readdir (E:\STUFF\commands\help.js:7:9)
at FSReqWrap.oncomplete (fs.js:135:15)```
@formal agate did you even read the error? emoji.js doesnt exist in the commands directory
i'm about to customize my bot's dbl page, how would i change the background?
what css properties should i be looking for*
right click > inspect element
ik, i found .wrapper-page but it looks kinda wonky 
not sure if that's the correct element
apply css to it in the inspector itself and test the results live
If I want to host my bot at multiple servers I just need to use sharding?
yeah
dammit i forgot about the inspector 
i just forgot how to use it so i havent been using it
i code websites live using the inspector lmao
And will it automatically connect to the server with the lowest ping
i dont think it will
It will just random pick one right?
if you use sharding, you can split guilds into multiple processes, and you could run each process in different machines
so each machine will handle a predefined group of guilds, chosen by the discord api i believe
internal sharding came out as well meaning you don't have to spawn multiple clients
(on d.js)
yeah but without multiple clients you cant run on multiple machines
no
if you run internal sharding on 2 machines, your entire bot will be duplicated
I use eris




