#development
1 messages · Page 1260 of 1
Outros idiomas podem ser falados no #general-int
Ok
{ "name1": { "price": 10 }, "name2": { "price": 20 } }
how do i get the price if i know the name
node.js
Use dot notation (obj.keyNameHere.price). If you can't because it contains a special character, use bracket notation (obj["keyNameHere"].price)
let item = args.join(' ');
message.channel.send(items.item.price)
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'price' of undefined
The item variable would be a string which is from user input, so you should use bracket notation.
You may want to log what fields items has and what item is, as it should work.
do u guys use djs v12 ?
is there a way to hard define a parameter?
like typing it in an ide will say like (name: String)
items[item] is undefined, so of course the program won't be able to "read one of its properties"
whats the best ssh client, other than termius
?? lemme guess you're new to py and you're coming from js/php
already did
do pip3 then
yeah ngl python paths are pretty shitty
sometimes you got to do pip3.x.x or python3 -m pip
cause pypy competes with homebrew which competes with pyenv
idk just am following a video on it and was like wtf
btw they removed the badge. just letting you know
dev badge
it doesn't
bam
its just we get a lot of people coming to this discord just for the badge so we let everyone know to fuck off
lmfao
it seems like you dont care about the badge which is great
have fun learning python!
no now i care give lmfao
ask here if you need any help
you can also ask in discord.gg/dpy in #help
but have fun continuing your guide
na to much work bro im already burning to much calories by typing so
its just gonna be me learning discord api and that is all
is there an api to fetch all available emojis (custom and non)
arguably python
generally beginners find it easier to read and understand than java, especially since its syntax can at times be "english-like"
client/run shouldn't be tabbed
also delete that screenshot
it has your token in it
the token = the bots password
oh lol idc
wtf
tabs actually mess with python
wtf if i spam spacebar does that mess it up to
oh lol idc
@earnest phoenix doesn’t care about a token leak, I can see how cut out you are for bot development
your bots just gonna end up like one of those "Hacked" bots mass dming everyone nitro scams
ok idc
lol ban my bot
already had 2 of my discord accounts ban they don't ban ip's so
it's like you giving me your discord email and password
it will suck
or you know, keep your token safe and don't waste more time having to make a new account each time you get banned lol
is it possible to adjust thumbnail size in embed
i need help with a command. That if someone stickies a message id, it will then go to database, then if someone sends a message to the same channel the sticky message is in, the original message will get deleted then a new message with the same message is being sent collecting the message id then replacing the one in the database then sending the message but i dont know where to start
or
gets the args[0] of the command then put the data in the database then if someone sends a message in the same channel, the message will get deleted then replaced by the data in the database
There’s about 2000+ devs on hopefully you get something out of this
whats the best way to set it as a database?
create a for loop?
hm
.length?
hmm
db.push yes
hmm
db.push(channelid, data)
then if db has channel id that the message.channel.id
it sends
ok ok ok
.
ok then
i got the channel id that the command is executed
and sends the message
so db.set(channelid, data)
is now set
next is to check if something
if the channel id is in the data base everytime a message is sent
db.get(message.channel.id)
there
then send it
but we havent deleted the old message
hmm 
if (db.get(message.channel.id)){
message.channel.send(db.get(message.channel.id))
}
command:
if (command == 'sticky') {
if (!message.member.hasPermission('ADMINISTRATOR', { checkAdmin: false, checkOwner: false })) return message.channel.send('You don\' have permission to run this command.')
let data = args.slice(0).join(' ')
m = await message.channel.send(data)
console.log(`${m.channel.id} / ${data}`)
}
hmm
welp it aint sending the messages
troubleshootin it rn
maybe i should post the message.channel.id along with the value???
then split it with comma???
then .split(', ')[0]
i think that is the way to do this
oh wait im an idiot
wait lemme fix it
Bruh I literally made my bot into a testing phase and they took it out
PING ME WITH ANY POSSIBLE IDEAS
is there a way to get the error to print out just the line\character number, instead of the entire thing? js Cannot read property 'prefix' of undefined at Client.<anonymous> (C:\wildcat\src\wildcat.js:68:54) at processTicksAndRejections (internal/process/task_queues.js:93:5) I found a way to get just the error itself but not the file/line/character
fetch the message and then delete it
Here is the final code. Its goddamn messy but who cares, I'm not gonna touch it again anyways
if (command == 'sticky') {
if (!message.member.hasPermission('ADMINISTRATOR', {
checkAdmin: false,
checkOwner: false
})) return message.channel.send('You don\' have permission to run this command.')
if (!args.length) return message.channel.send(`Usage: \`${prefix}sticky <message>\``)
if (args[0] == 'off') {
db.delete(message.channel.id)
message.channel.send(`Sticky has been turned off`)
return
}
let data = args.slice(0).join(' ')
let m = await message.channel.send(data)
db.set(`${m.channel.id}`, `${data},${m.id}`)
}
if (db.get(message.channel.id) && !message.content.startsWith(`${prefix}sticky`)) {
console.log(db.get(message.channel.id))
let id = db.get(message.channel.id).split(',')[1]
client.channels.cache.get(message.channel.id).messages.fetch(id).then(message => message.delete())
let oldID = await message.channel.send(db.get(message.channel.id).split(',')[0])
db.set(message.channel.id, `${db.get(message.channel.id).split(',')[0]},${oldID.id}`)
}
ps: can someone clean that up for me plz?
Tf
this channel is for 'help'
@carmine summit use vscode autoformatter
{
bot: '716985864512864328',
user: '699849763365060608',
type: 'upvote',
query: undefined,
isWeekend: false
}
TypeError: vote.user.send is not a function
I got this error for first time
From many days it's working perfectly
"user" is a string, so I am not sure how it worked correctly before
yo
i think i need some help on makin a bot
trying to have it reply to a message (without prefix) with a ping
i already got the ping part
but how do you reply to a message without a prefix?
(first time dev)
how to make bot reply to a message without prefix?
{
bot: '716985864512864328',
user: '699849763365060608',
type: 'upvote',
query: undefined,
isWeekend: false
}TypeError: vote.user.send is not a function
@delicate shore vote isn’t a user object
it’s a user ID
what even made you think that’d work
Can i make my own server to host my bot 24/7?
in theory yes but it’ll probably be quite expensive
It worked 2 days back
kk
me thinks you just didn’t get any votes

Me thinks you are drunk
how do i split msg inside code block
split by what
{ split: true }
my msg contenttext is more than 2000
everytime i use that
it prints my message without code blocks
``'` this gets printed like it's normal text not code block
did you use { split: true, code: "js" }
lemme try
yes
@slender thistle Did u call me?

lol, cannot believe its another drunk night coding more cache related tasks
how to make bot reply to a message without prefix?
like this
"something something word that triggers bot something something"
check for those words before defining prefixes and such
nah that code is poggers
if i have a string like "hello world", how would i remove the space so it becomes "helloworld"
if i have a string like "hello world", how would i remove the space so it becomes "helloworld"
@silver lintel you can use regex (orstring.split("").filter(x => x != " ").join(""))
if you use regex, you can use string.replace(/\s+/g, ""), which removes spaces and newlines
how to capitlize a letter? like "hello", capitilize 3 so it becomes "helLo"
you can split the text and uppercase the letter via index
for example js const text = "hello world".split(""); text[3] = text[3].toUpperCase(); text.join(""); // "helLo world"
use https://hasteb.in btw
Oh yeah ^
C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\structures\MessageEmbed.js:432
if (!value) throw new RangeError('EMBED_FIELD_VALUE');
^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values may not be empty.
at Function.normalizeField (C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\structures\MessageEmbed.js:432:23)
at C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\structures\MessageEmbed.js:452:14
at Array.map (<anonymous>)
at Function.normalizeFields (C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\structures\MessageEmbed.js:451:8)
at MessageEmbed.addFields (C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\structures\MessageEmbed.js:266:42)
at MessageEmbed.addField (C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\structures\MessageEmbed.js:257:17)
at Object.execute (C:\Users\Ryan\Desktop\Bot\commands\kick.js:81:10)
at Client.<anonymous> (C:\Users\Ryan\Desktop\Bot\main.js:67:37)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (C:\Users\Ryan\Desktop\Bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14) {
[Symbol(code)]: 'EMBED_FIELD_VALUE'
}
oh
k ill use haste next time
kick.js 81th line
k
``
const kickembed = new Discord.MessageEmbed()
.setAuthor('Kick Success')
.setColor('#e098b6')
.addField('User Kicked:', member)
.addField('Kicked by:', message.author)
.addField('Reason:', reason)
.setFooter('Time kicked')
.setTimestamp()
message.channel.send(kickembed);
}``
idk whats wrong
@crystal depot are you sure message.author , member and reason aren't falsy values?
Maybe put your code into a https://hastebin.com
nvm i figured it out on the docs
nvm i figured it out on the docs
@soft eagle imagine asking your question in #topgg-api then coming over to #development to say you fixed it
well that issue isnt fixed yet
should be 210 with 2 shards
for some reason its not posting

hi i have a question
this code not working another server
can u help pls?
i dont know why not working another server
my message deleted?
Post that code again but in https://hastebin.com/
lol
@drowsy sentinel https://hastebin.com/cecoxejuda.js
why my code not working
@crystal depot hey
can u help?
wot

@carmine magnet helppp
@carmine magnet https://hastebin.com/cecoxejuda.js
why my code not working
Whats your error
only 1 server working
if i am create another server and create roles
this code not working
ok. 😦
Do you understand ur code ?
yes
Ok so you can fix it alone
my problem is
id
role id
my role cant same id another server
how to fix it
If you made the command a role specific only command by ID then you cannot use it in another server
@zenith terrace uhm ok
how to direcctly rol name
role*
import code
i wanna to
not id
how to import role name
@earnest phoenix what the fuck are you trying to say
@earnest phoenix i say to
this code how to fix it
i wanna uninstall id
and i wanna use names
a example

491749174917494 example id
your English seems bad
@earnest phoenix yes
can you speak another language?
ok
Şi
come to #general-int for other languages
how can i solve my bot lagging so much
@earnest phoenix how to change role id to role name in discord.js
selamlar botum kayıt botu. şimdi kayıt olması için rol id lerini yazdım fakat başka serverda çalışmıyor. ben id yerine isim ile nasıl değiştirebilirim??
@earnest phoenix english only here
what the fuck
i said man
this person said to all langues allowed here
@scarlet dragon
what the hell bro
ha?
Are you sure you read correctly?
@earnest phoenix how to change role id to role name in discord.js
@earnest phoenix you can't convert an ID to a role name
you can search and find which role matches the name
smplapslmqpazqazpmq? <- my language
@earnest phoenix what the fuck are you trying to say
Hahah thinking the same thing
@earnest phoenix best thing is to learn js first before making a disc bot
@earnest phoenix best thing is to learn js first before making a disc bot
@obtuse niche IT IS A FUCKING NECESSITY

Of course
bot dev in 2020
- “i should make a bot”
- “what language should i pick? hmmmm. Either python, c#, c, java, go, kotlin or the language everyone told me to ignore, node.js. Ima go with node.js”
- “I dont get this, lets ask on discord.gg/dbl how to make a bot”
- “Man they tell me to learn node.js, but idk how it works. rude.”
- depression
I learned Python by making a Discord bot
i learned js by making a bot
Well python is a pretty easy language so its possible to do that
So is JS
Nice
hi i'm using discord.js and idk why is there an error and idk how to fix it if u do know please ping me!

I'm doing it on the phone and bot desinger for discord Can someone who knows me if they need codes to turn on music and come to the audio room in the app
@fierce wolf it would help if we could actually SEE what comes before the split 
what the fuck
ads?
fuckkkkkkk you luca
. S p i t
Yes
@Hylke#5900 Bro
I wanna say
Look this code
Yo're see ID's
I wanna delete ID's
And place Role Name
How I do It?
This ID
I wanna delete ID's
And place Role Names
Can u understand now?
He is professional but i croock
well
@earnest phoenix i like how your excuse is "I suck at coding", Go learn JS.
OMG
I fix it
@earnest phoenix thanks
i have all my commands, listed in an array
how can i convert my array into a help command
show code
```let skyblock = [' ah', ' bazaar', ' ign', ' price', ' stats', ' timers', ' update', ' uuid']
let fun = [' meme', ' say']
let moderation = [' ban', ' kick']
let util = [' clear', ' ping', ' setprefix', ' supportserver']
let help = **Skyblock**\n${skyblock}\n**Fun**\n${fun}\n**Moderation**\n${moderation}\n**Util**\n${util}
you don't need to
so im just gonna skyblock = ['command', 'command', 'command']
just do ${arrayName.join(", ")}
that's what u want, don't you?
hm
i dont have advanced command handler
keeps saying that client is not defined
so i fucked my advance command handler
what does functions file do
HOw
use named exports for your functions or simply export all default
im here because i read the docs and i didnt understand
eeew
@opal plank why not
is there a way to module.exports all
cuz you will have to create a big ass object to be passed around, also vars is just yourself setting up for a shot in the foot
named exports
exports is technically all
export function a() {}
export function b() {}
better than
module.exports = {
a: a() {},
b: b() {},
}
so remove module.exports
function.js
export function myFunc() {}
the file
import { myFunc } from './function.js';
instead of that znix
used named imports
import * as myFunctions from './function.js'
import {User} from ...
what is that suppose to be...?
ur talking about that right?
no
first {} is importing a property/class
so {User} is importing the exported class User
the way im explaining is importing all
which uses * as its syntax
export function (time) {
let date = new Date(time);
let hr = date.getHours();
let min = date.getMinutes();
let sec = date.getSeconds();
hr = (hr < 10) ? "0" + hr : hr;
min = (min < 10) ? "0" + min : min;
sec = (sec < 10) ? "0" + sec : sec;
return hr + ':' + min + ":" + sec;
}
like this>
**import ***(all) as(alias) functions from(file) './filename.ts'
meh i like importing what i need
const client = new Discord.client();TypeError: Discord.client() is not a constructor
C
im an edot
rather than
import {a, b} from '/file.js'
you may very well do
import * as Functions from './file.ts'
Functions.a()
Functions.b()
The one good side of passing all is that you can dynamically provide all functions in your code.
Say on your handler, you pass execute(message, Functions)
Boom, now all your files have access to all functions without you having to declare them individually
what
oh i see what u mean
how
wtf
why lag
no
my wifi fast
how
rather than
import {a, b} from '/file.js'you may very well do
import * as Functions from './file.ts' Functions.a() Functions.b()The one good side of passing all is that you can dynamically provide all functions in your code.
Say on your handler, you pass execute(message, Functions)Boom, now all your files have access to all functions without you having to declare them individually
@opal plank how
how
where
if (message.member.roles.find(role => role.name === 'role')
@earnest phoenix whats the error
pls wait
`const Discord = require('discord.js');
exports.run = (client, message, params) => {
if (message.member.roles.find(role => role.name === 'role'));
message.channel.send('🔢 **Creating all roles for Epix Bot...**'); message.guild.createRole({ name: '💮 | Register Admin', position: 50, permissions: ['MANAGE_ROLES'], color: 'GREEN'}) message.guild.createRole({ name: '🌃 | Boy', position: 20, color: 'BLUE'}) message.guild.createRole({ name: '🌌 | Girl', position: 30, color: 'PINK'}) message.guild.createRole({ name: '🥚 | Crock', position: 30, color: 'LIGHT_BLUE'}) message.guild.deleteRole({ name: 'role'}) } else { message.reply('❌ **Please first crate role with `role` name.**'); }};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 3
};exports.help = {
name: 'role-init',
description: 'All roles initsall',
usage: 'role-init'
};`
omg
@earnest phoenix don't ; at the end of the if lol
hm wait
and LEARN JS
also module.exports prob good case use in here
how do I export my functions?
@earnest phoenix learn js
@tight plinth I KNOW IT
@earnest phoenix you dont know it
if ();
are u serious
Dude, for real, this isnt google. We here to help but you should really stop coming here as if this is a search engine. Do your research, if you get stuck, come here to ask for help. @carmine summit
smh
you arent, i gave you the instructions you needed
you didnt even bother looking for documentation on import/export es6
@earnest phoenix @carmine summit go learn JS or smthing.
send me da link
you just coming here expecting spoonfed code
ima read
Stop being a vampire dude
Second of all,
you just coming here expecting spoonfed code
^
Hey google, can I have the link for the docs?
@carmine summit no
bad google
Go fucking search yourself
You dumb fuck
@split hazel we need help
Yoy treat us like we are your slave
getting too heated and offtopic
@earnest phoenix calm down bud
what is es6??
I searched what is es6 then google presented me with results on how to use es6
how convinient
can't u just fucking READ what you find smh
Hes just dumb
Ngl a couple minutes ago i forgot why i had them blocked. Funnily enough, i just remembered 
I gonna block him too
I have enough with this guy
Treated us like a slave, awaiting spoonfeeding.
i cant see you
const roles = message.guild.roles.cache.sort((a, b) => b.position - a.position).map(role => role.toString());
let roleString = roles.join(", ")
if there are moe than 10 roles, i want to cut it, how
why not take the first 10 roles instead
fuck there was a thing
wlel yeah you can use that
but there was a syntax special for cutting stuff
fuuuck i cant remember
it was some fancy af shit
but how do i only get the top 10 roles?
slice
slice is used to get n elements from an array
it wasnt break
there was a handy thing for this but im not finding it
AH YEAH
it WAS break
for push break
slice works nicely as well
i remember needing something like that for something with an odd shape
for(let a in thing) {
if(size>=max) break;
//insert element here
}
i believe it was something along those lines iirc
This is infuriating not gonna lie
Hi, I have a question
How do I get a Channel in a guild?
let mainChannel = message.guild.channels.cache.find("name", "talking 1#")
I tried this.
@balmy anchor Which lang? Which lib?
JS
d.js i see
yep
find takes a function
or filter
actually
lemme double check
i think find is a filter()
knew it
it takes a function
just like filter
@balmy anchor https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find read that
i should've thrown w3 tbh, its easier to read when you new
I used
let mainChannel = message.member.guild.channels.cache.find(c => c.name === "talking 1#");
And it worked thank you very much!
@balmy anchor

Do I look like im experienced?
@carmine summit yes you do like you are experienced in being a dick
require is not defined
@earnest phoenix damn that hurt hard
sarcasm right
@carmine summit GOD IF WE'RE UNWILLING TO HELP JUST GOTO SOME PLACE LIKE PLEXIDEV OT STACKOVERFLOW
@earnest phoenix bud calm down, just block him
ok
done
Nice.
i don't block people much because people think i have a very low tolerance level
ppl damn mean
@carmine summit welcome to the programming community where we don't treat new people as babies we treat them the way everyone deserves
geeze buddy are you even in a nodejs app
how the hell is require not defined then
maybe his compiler is drunk
require should be an instance of NodeRequire
Or hes on older ES
maybe his compiler is drunk
@earnest phoenix javascript needs no compiler...does it?
It's a JIT compiler.
interpreted/jit
aka "compilers to memory" if you want. also call an interpreter
@carmine summit I don't know what you did to poor ol' nodejs to make it not accept require() but you dun fucked up massively.
How are you running the app CWickks
Try to update ur nodejs
Reinstall the modules
There are cases where require and other stuff could be gone
@thin turret wont hellp lol
how do you even run a node app without nodejs or with nodejs that doesn't have a require() 😕
ok
ill explain
pls no block
so import convert from '../functions.js' results a SyntaxError: Cannot use import statement outside module
then i searchd on stackoverflow
how to deal with it
why are you trying to use import
functions
you're in nodejs, nodejs uses require()
-_-
so i went in to type "type": "modules" in package.json i got from stackoveflow
so you want to use ESM and have to change every import/export in your app?
that results to require being undefined
so you want to use ESM and have to change every import/export in your app?
?
@earnest phoenix it'll appear in #logs . the wait time is over 6 weeks (almost 2 months)
Where can I get confirmation if my bot is approved?
@earnest phoenix DM by Luca
@carmine summit just revert what you did, go back to using core nodejs without ESM, and since your google-fu sucks ass, look at https://js.evie.dev/modules
Ok
You really should seriously consider going through a javascript/nodejs course though >.<
How to tell if a user copied and pasted a message like Dankmemer does
Probably it has a list of copy/pastas, because there's absolutely no way to know where the text of a message comes from or if it was copied.
i just didnt know that that code will ruin my app
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/757907517597810698 <= Because someone suggested it...
exports.convert = convert;
how do i export multiple by curly braces
I dunno man maybe if you actually read shit instead of skimming it and then asking questions that have been answered, people would actually want to help you more
True
why is it saying that
Because you have a semicolon ; on line 118.
lol i just say it
Hey there
I would like to know if there's a way to find a category by a part of his name
For example:
Command = -select "Texts"
And the real category's name is "Channels Texts", but it includes "Texts", so the bot find it.
@ripe grotto So, you want to find a part of text within a string?
Yes :x
Yes :x
@ripe grotto Sounds like you're looking for this: https://www.w3schools.com/jsref/jsref_includes.asp
Thanks
whoever ghost pinged me is gay
install the chalk module ?
npm i chalk
if you don't know how to install packages with npm i suggest your reading some guides or docs
im dowloading now
i have so many not dowloaded modules how can i download all
@sand condor
pretty sure it's just npm i
just do npm i
if you have a package.json file with all the modules you can run npm i
İM NEW
fair enough goodbye
hey new, im constanin. I recommend learning the most basic node.js functions before downloading a discord bot template @astral matrix
just a little suggestion of mine.
-.-
no im serious
if you dont know how to fix a "module missing" error, you need help
are you though
@thick gull why u adding reactions and removing them instantly lol
//index.js
const functions = require('../functions.js')
var uptime = functions.convert(client.uptime)
//functions.js
module.exports = function convert(time) {
let date = new Date(time);
let hr = date.getHours();
let min = date.getMinutes();
let sec = date.getSeconds();
hr = (hr < 10) ? "0" + hr : hr;
min = (min < 10) ? "0" + min : min;
sec = (sec < 10) ? "0" + sec : sec;
return hr + ':' + min + ":" + sec;
}
```why no work???
error?
functions.convert is not a function
Oh yeah, your module.exports is a function
remove .convert
just functions(some timestamp)
That won't fix it either. module.exports is still going to be a function
but he will call that function, then
exports.functionName = function() {
}```
hm
you should just have an object of functions
what if i have multiple functions?
@carmine summit you can do it like this: ```js
module.exports.functionName = function() {return "a"}
module.exports.functionName2 = function() {return "b"}
functions.functionName() will return "a", functions.functionName2() will return "b"
oh ok
how to fix that too 😄
I don't think module.exports is an object by default
your code has syntax error
syntax error @astral matrix
try looking
aka code dumb
how to fix it bruh
@astral matrix revert it and try not to copy paste code if you dont know what oyu are doing
im 14 yr/ old
im 17
😄
hey little farchioN, here are some steps how YOU can become a bot dev
- dont use a template from github
- learn the language you want to make a bot in
- dont ask for the dumbest questions in the dev channel
- succeed
dont ask for the dumbest questions in the dev channel
No question is a dumb question, but I would suggest googling your question first before resorting to discord!
"how to fix 'module missing' error" is a dumb question
I wouldn't say so, he's new to this.
DUDE STOP BEING IDIOT I SAID YOU I DONT KNOW ANYTHING
sigh
Anyone know of a good way to streamline message deletion in discord.py?
I'm currently looping through a list and deleting them that way but there appears to be some lag (not sure if it is a Discord thing or not.)
Code I'm currently using:
messages = []
if count != 0:
messages = await ctx.channel.history(limit=count + 1).flatten()
else:
messages = await ctx.channel.history().flatten()
for message in messages:
await message.delete()
Like I said, this works, but pretty slowly. I've seen other bots do something like this in a matter of seconds, but I've got some lag. No errors or anything, just wondering if I can make it faster.
send me your code
@carmine summit code?
Just make a command that shown random dogs pic, work well but shown this, I think it's okay 🤔
isn't there an endpoint to bulk delete messages?
@inner wharf There is a bulk delete function, only works if messages aren't older then 14 days though.
Hmm ok I'll go look in the docs for that thanks

@inner wharf There is a bulk delete function, only works if messages aren't older then 14 days though.
@sacred cypress only exception if you have the message id ??
If messages are older then 14 days, you need to manually fetch x amount of messages and map through them and delete them with a separate API call per message, if that is what you're asking... ?
and that could lead to potential api abuse, i wouldn't recommend doing that
^
token
Ah got it, its delete_messages(), must've completely missed that the first time around. Thanks
leak
leak
LEAK
wtf
NANI
How i get moderator?
lol not by asking
By being moderator 😆
.
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
now
now
How i get moderator?
@earnest phoenix /plsmakememoderator
now
@earnest phoenix Go to the discord development panel and request a new token.
/op me 😆
@earnest phoenix https://discord.com/developers/applications NOW
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
can't bots read this channel?
wdym
if so there's bots that post tokens to github
Spamming won't speed up the process @carmine summit
like token snipers 🤔
ok
oof
just sending the link
Appreciated 
is it recommended to have separate folders for separate command categories?
or just stack them up in /commands
up to you
Categorizing is always a good idea!
I have a giant business logic class, but breaking it down per command is more organized
how about one file with all commands
@pale vessel so you've chosen hell...
how about one file with all commands
@pale vessel yes. and it is over 1.5k lines
i rewrote and became 400
i rewrote and became 400
@carmine summit you'll not get world record
when i first discorvered the badge. i went to learn straight to bot development
with no knowledge about js at all
I don’t find 😦
but i learn by experience 👀
yezh
I mean, learning to code is great
personally I wanted to be 1 coder since km like 6 or 7
then I discovered that py is shit
I was writing Windows batch scripts since elementry
im 14, am i too early for learning javascript??
no
No
age dont matter
never to early
uwu
Man just said uwu.
@sacred cypress uwu

My programming language timeline:
High: Bourne-again shell script
College: C#, Java, Python, JS, SQL```
I spent an hour yesterday trying to figure out how to interpret java script timestamps into python datetime just to realize that I could use the discord created_at function and now I'm sad
by myself: js, py, html5, c, golang
thx to school: sql
Anyone able to join VC and let me screenshare my code, I legit don't understand what's wrong with it
JavaScript btw
Forgot about SQL 🙂 ty
@faint prism
My programming language timeline:
Elementary: Pawno
High: Pawno
College: Pawno
;-;
I wouldn't consider html a prog language.
But golang, interesting!
Ok
@tight plinth wow your school teaches sql?
Go also C
yep
HIGH: JS, Python, Java(lil)
COLLEGE: IM 14!!!```
I've got a bit of ASM under my belt. Not enough to include
x86 assembly 
x86 assembly
@earnest phoenix plz no
do you actually know anyone who can program in whitespace
what the fuck is whitespace
whITEspAcE
please no
exactly what it sounds like constantin
a programming language DESIGNED OF WHITESPACES
what is this undefined mean 🤔 I try making userinfo command.
you cant read shit
PLEASE NO
I mean, in theory, you could contain an entire white space program inside of a completely different program except for indent dependent like python
Brainfuck, but it's whitespace characters 
@native canyon O:
}
}
}
}
}
```is there any way to prevent this? is this bad practice?
You have too many scopes
not so good.
break it down.
yes
theyre all an if statement lol
}}}}}}
Break it up in seperate if statements.
this is gud
ig ```js
if (!err) {
if (success) {
}
}
// instea do
if (err) {
return
}
as example ^
I love posting this
using System ;
namespace WhiteSpaceDoesntMatter {
public interface IA {
string Prop {
get ;}}
public class A :
IA {
public string Prop {
get ;
set ;}=
"Test" ;}
public static class ExampleClass {
public static void Main (){
IA a =
new A ();
Console.WriteLine (
a.Prop );}}}
j a v a
C#, but close
The naming convention is the difference here
Can someone please help me via screen share?
PascalCase, not camelCase
message.guild.members.cache.find(u => u.username.toLowerCase() === args.slice(0).join(" ").toLowerCase())
TypeError: Cannot read property 'toLowerCase' of undefined
trying to find a user by name?
Can someone please help me via screen share?
@earnest phoenix justask
yeah
it's not a user, it's a member. u.user.username
@faint prism is it possible to programm a big application in pascal
@faint prism is it possible to programm a big application in pascal
@midnight blaze PascalCase? I don't see why not...
to smaller the code
WhyNot
What
👀
oh
200lines / 20 functions limitation
Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honour of the French mathematician, philosopher and physicist Blaise Pascal.
I guess using a guild members name doesn’t display avatar url...
it looks terrible
some1 suggest me logic to make restriction command for roles, so I can restrict some commands only for some roles
if(!message.author.roles.has(ROLE))
@open rune "if member does not have role, stop the command"
¯_(ツ)_/¯
@carmine summit github branches are extremely useful when you use them for what they're meant - different development branches that you eventually (probably) merge together.
Every new feature = a new bernch - merge that to dev, PR to master
it's actually like we can choose which role will be restricted for
like: /restrict -command -roles
I usually keep a production and a dev or feature branch
```.setAuthor(${user.tag}'s balance, user.displayAvatarURL())
^
TypeError: user.displayAvatarURL is not a function```
This happens for some reason when I put a username in the arguments...
looks like that's not a user object
Every new feature = a new bernch - merge that to dev, PR to master
@sacred cypress Should I delete the branch after? I have a pipeline run for commits todev...
const user = message.guild.members.cache.find(u => u.user.username.toLowerCase() === args.slice(0).join(" ").toLowerCase())
this is what i have for usernames
Squash and merge to dev, delete branch that contains the new feature. PR to master but never delete the dev branch
sounds good to me
async execute(message, args, client, Discord) {
@stable eagle could be that you spelled the name wrong, or maybe they have a space or a special character in their name, or something? Getting people by username is generally a bad idea anyway. You should provide an ID or a mention instead.
^ is this a thing ????
@umbral zealot nope, I didnt
well, either way, use the ID.
welp, ok
yes use the id
you can have 10,000 people named "John", so who is gonna be affected when you use their name?
uh
client.users.cache.get('id of the guy')
god no
@carmine summit its users actually
eh?
client.users.get
message.client.users.cache.get(args[0])
yeah that would work.
yes
or use mentions.
i dont need that grrrr
my first bot is in 25 guilds now
without top.gg
because i still have to wait 2 or 3 days
But are any bot farms?
probably 95% if their bot follow the trend. 😛
I have an admin command for that 🙂
yes
you need to meth
yeah, meth
yes, meth
What part exactly are you wanting?
well I mean my bot is open source
hi
"gimme code nao I can't write anything myself!" 





