#development
1 messages · Page 1618 of 1
restart ur terminal
OH MY GOD ITS NOT WORKING
then restart ur pc
why
i dont wanna restart
NEW CHANNEL:
https://www.youtube.com/channel/UCEjwgKUADCmMzhGHrlueKYw
This channel will become inactive in a few weeks. Thank you all for watching :)
just restarting your terminal should be enough, but a lot of apps require a system reboot to apply changes
specially when they change shit in registry
then dont restart ur pc, figure out another way to make it work
good luck
let inventory = `${bot ? "Bot" : ""}` + `${item2 ? "Item2" : ""}`
works but if you have both bot and item2 it just does
BotItem2
i tried putting \n for item 2 but then if you dont have bot theres a space

what
Error: Cannot find module 'discord.js'
Require stack:
- C:\Users\Lenovo\Desktop\me\me\New bot\My_Bot.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\Lenovo\Desktop\Kids Stuff\Riot\New bot\My_Bot.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Lenovo\\Desktop\\me\\me\\New bot\\My_Bot.js'
]
}```
download discord.js
how
well install rather
npm i discord.js
in terminal
or wherever you run your commands
oh i did it
im gonna hit them with the learn first before they do it
cuz i can see them coming here every 2 seconds asking why it doesnt wrk
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!
^
fun
@misty sigil TYSM
what
dementia
I GOT IT ONLINE
Learn to code a Discord bot with JavaScript using Node.js.
🔗 Written Tutorial - https://www.devdungeon.com/content/javascript-discord-bot-tutorial
🔗 Unicode Emojis - https://unicode.org/emoji/charts/full-emoji-list.html
🔗 Official Documentation - https://discord.js.org
Tutorial by Dev Dungeon. Check out their YouTube channel: https://www.youtu...
lol
lmao
i mean if i checked if each inventory value was false, it would work
but then thatd require checking for each item
so idk
ternary is supposed to be used for short hand operations so you don't have to type out a full if else
if you're going to scale this
you're better off using if else/switch
this can be one entire string
o
but if they dont have item 1 and have item 2
it'll be
Inventory:
Item2
instead of
Inventory:
Item2
that's just a simple issue in your logic, use newlines in the true section of the ternary
`Inventory:${bot ? "\nBot" : ""}${item2 ? "\nItem2" ? ""}`
wait
let inventory = `${bot ? "Bot" : ""} ${item2 ? "\nItem2" : ""}````
this worked
lol
nvm it didnt
i have both items
pray to discord gods
LMFAO
your prayer will be answered in 3-5 business days
how do i make it so the bot sends a message?
Alright bud
Do me a favor and go to discord.js.org
And start reading
OR
lol that even works with that n hahah
JS won the program wars back in 1995
xD
don't think so
you call that Syntax. that's sth python doesn't know

You guys do js or python?
js
Noice
both
@rustic nova
Fixed itbot.guilds.size.toLocaleString() is coming out as 0. Anyone have any ideas why? And no, its not because the bot is in 0 guilds
@rustic nova how do I exist
you breathe
you sound like a baby sitter buddy

like a good one
make sure ur intents are on and why tf you'd need a string for size
because 1,418,137 is better than 1418137 
🤌
instead of that try bot.guilds.cache.size
I use v11
oh
:P
you should get v12
neh, to many cache's
understandable have a great day
I'll update when discord forces me to
How do I fix this? I forgot
disable requiring code grant on your bots discord page
best is to not send your full bot url @hoary vine 
Thanks
What
Why
you sent your bot url, that's what i mean
yeah it's considered advertising, though i think that was in context of help was it?
well, it was an unrelated help question
Anyone else getting sharding problems?
Can't delete bots from top.gg listing? I've emailed the support team but have not heard back. Is this a known issue?
nope
do you have fetchAllMembers:true?
My code has been working fine. Where would that be set? In client options?
I misread that as
"How do I add a bot?"
"Cry."
thats one possible cause, if you had it
but if you dont then its not the reason
do you do any kind of heavy work on start?
like loading data from a database
or from files
I don't have fetchAllMembers set. It logs into the db on ready.
And loads the command files
Basic stuff
Exceeded identify threshold?
That the problem?
Sorry for the ss
I can't get to my computer right now
you logged in more than 1000 times in a single day
Open ticket?
no
Wait?
Omg
rip
hi Tim
is the website STILL broken?!?!?!
yeas
yeas
will the ever fix it? (not actually ever, just in the next month)
there is no ETA atm
the website isn't completely broken, just specific features we want to take time to fix without breaking more stuff
just extra frustrating for creators rn
which I can understand
this happening gave me an idea to make my own website
xetera
go for it
while you're here
erm
might've found something
erm.... interesting
to say the least
idk if this is still on the "migration"
but a string on a user image is kinda weird
Looks like a placeholder
i mean those aren't pictures so it makes sense that they aren't draggable
it shouldn't be completely transparent tho
it just seems odd that its a string instead of a placeholder image
doesn't seem too weird to me
a T as a default image?
what bugs me is that its a string tho
if its not a bug its whatever, ignore me if thats the case
but i would've assumed placeholders would be default images
and not strings

Dynamic placeholders
There probably should be a background color to maintain aesthetic
As xexe said
xexexexexexexe
going to make a website... first step: learn how to program javascript and HTML, second step: learn how to make a website
definitely going to take a while
Or just jump to js + react
hey help me
Can't add bots
cough cough npm i boilerplate cough cough
i know nothing about HTML and JS, only python
idk maybe it's something to iterate on later but not at all important rn
React ain't html
Use flask then smh
cough cough
someone made a server called not found?
definitively corona
hello wheres the place to ask about topgg page? i want to ask something
yo is there where i can ask for help on code discord.js
oh wait yes
lmayo
if(warnings === 3) {
const mutingrole = db.get(`muterole_${message.guild.id}`);
if (!mutingrole) return message.channel.send('There is no mute role, set one using the command `<setmuterole <role id>`');
var role = message.member.roles.cache.find(role => role.name === mutingrole);
if(mutingrole) user.roles.add(mutingrole);
message.channel.send(user + 'has been muted')
}```
lol js code lmayo ok bye
TypeError: Cannot read property 'add' of undefined user.roles.add how do i add roles. tryign to make a warn command and it doesnt add role
tbh the var role is just there
how do you find out how many users is using ur bot?
- Make sure user is defined
- if(role) because you have var role there
- user.roles.add(mutingrole.id)
can someone explain how to do slash commands to me?
User is defined
Na
Ok
how to do webhook upvote messages
What is comand Mute (BDScript)
Something like <Client>.guilds.cache.reduce((a, g) => a + g.memberCount, 0) will work
If you have shards it'll need to be different
is this somewhat correct for slash commands?
https://i.imgur.com/W39JT9G.png @slender thistle
i got it to work the way i wanted it to
ples^
yeah
this is just a chatting channel for bot dev
i have stuff i like to share too lol
ok ok, can you tell me if i am correct there or not?
idk djs lol
Sorry
Spanish md pls devs
can someone help me with application.commands scope
Poggers
can't you do exists = True in (hook.name == "Transword" for hook in hooks)
if(message.content === `<@!${client.id}>` || message.content === `<@${client.id}>`)
You're just deleting the last element in the list?
the last used one, correct
This is a clever solution (at least I think it is) where instead of checking for if a webhook is present in every channel, I check for the bot integrations list for a webhook
then i re-brand it and change it to a new bound channel
So you're not deleting the one named Transword
is this correct?
If I were to check if it exists, I'd do any(hook.name == 'Transword' for hook in webhooks)
If I were to delete the one named Transword,
hook = discord.utils.get(webhooks, name='Transword'); await hook.delete() if hook else None
1liner ftw
thank you for sharing your approach
anyhow, i will be working on the message listening event today for how the messages will be converted and translated
Makes sense only if the whole message is the mention only without any other text.
Since content isn’t trimmed even using a space behind the mention will not trigger your statement
If you wanna know if the whole messages includes that mention, then use message.content.trim().includes(...)
msg.content.replace(/[<@!>]/g, '') === ID is what I do 
Shhh
thats more complicated tbh
just check if the content includes a mention
yes you dont need regex
Regex is a mystery for the most people @crimson vapor
uhh what?
it is for me as well
Yes that exists
lmao
yes but the client is not a use-
I search: "regex for X" and pick and test the first one

actually
Just do a regex check
If you wanna use mention as prefix
Wait let me send my regex from my secret code
just do this. no regex no nothing. just djs and an if statement
Once again u wanna check if the content include that mention or if the whole message is the mention only? krabby
Working with match groups and conditions in regex is “complicated”
if you want to check the whole message just do js message.content.includes()
but i just want a direct mention
You wanna check if the mention is your client id?
If so message.mentions.first().id === client.id is your way
new RegExp(`^(<@!?${client.user.id}>|${escapeRegex(prefix)})\\s*`);
Doesn’t make sense to search or split strings if a property with the mentions already exists
Check google for escapeRegex function
Is there anyone that know if its possible to apply for a higher youtube api quote limit for my bot or google doesnt accept?
Qhat ?
Get id not the whole object
if(msg.content.includes(client.id) && (msg.content.length = 22 || msg.content.length = 21)) // do shit```
What if you randomly write bots id somewhere and it executes code ?
Thats the problem with this
Good catch... forgot to wrote the property behind first() lmao
Happens if you’re still awake at a time you should sleep 
ah rip
Well I’m working 7 days a week.. so doesn’t count for me
oh yikes
Rate my site -> https://shortli.cf
Shorten your links using fast and reliable ShortLi Services.
Not a self promo tho
At least optimized for mobile
Worked hard on that
Well entering a link and hitting enter reloads the site without a JS scroll down event to get to the select element of the link again?
Just show the select link type element before hitting the button and scroll down to the result again via JS after sending it
guys, is the discord developer's license good?
I didnt get it
The link creation is on a different page
The home page just redirects to that page with the entered link
As data
Well then scroll down to the select element if JS detects scroll down is needed
It redirects me as u said and I’m back on top of the page after entering the link and confirming the form
Need to scroll again...
Quite easy for example using jQuery
Will just use #section tags
I found a little bug which breaks the ui on mobile a bit after creating a link
Not that I could take a look at the source code on my mobile device
im trying to get the mentioned user to just their username, but it keeps showing the id
whoToCheck = msg.content.substring(10);
mention = msg.mentions.users.first();
if(whoToCheck === "") {
whoToCheck = msg.author.username.toLowerCase();
} else if (whoToCheck === mention) {
whoToCheck = mention.username; /* supposed to change, e.g., @CrashRocks1419#1750 to just CrashRocks1419 */
} else {
whoToCheck = msg.content.substring(10);
}
how can i make just the username show in the title?
how do bots get notifs for when channels post new content on youtube, is it just a periodic query or is it a post you can get from youtube
Get the username of the mention obj...
msg.mentions.users.first().username
Or since you defined it already mention.username
that's what i have down
Oh nvm I see...
for whoevers question the rounding thing was
actually use this instead Math.ceil((N+1) / 10) * 10;
You’re catching mentions.user
Just catch mentions.members.first()
yup
The username property includes the tag, not the nickname property for members
so it would be
whoToCheck = msg.content.substring(10);
mention = msg.mentions.members.first();
if(whoToCheck === "") {
whoToCheck = msg.author.username.toLowerCase();
} else if (whoToCheck === mention) {
whoToCheck = mention.user.username;
} else {
whoToCheck = msg.content.substring(10);
}
Nope
oh
whoToCheck = msg.content.substring(10);
mention = msg.mentions.users.first();
if(whoToCheck === "") {
whoToCheck = msg.author.username.toLowerCase();
} else if (whoToCheck === mention) {
whoToCheck = mention.nickname;
} else {
whoToCheck = msg.content.substring(10);
}
*whoToCheck I mean...
Ok... this was my php build... should I recreate it using express and react ?
mention = msg.mentions.members.first()

still nothing
Did you mention the user and is the user in your guild?
wait crash, read to Fake
yes to both
Ok lol
how do bots get notifs for when channels post new content on youtube, is it just a periodic query or is it a post you can get from youtube?
Are webhooks working now ?
Crash, because only not use
const mention =
msg.mentions.members.first() ||
msg.guild.members.cache.get(args[0]) ||
msg.member;
FaKe, is that correct?
need api from Youtube
I know that
I was just saying is it something youtube can send to you, or is it something you request from them
Just guessing common big APIs will never send something to you... it has to be fetched always
That’s the reason why limits existing
according to my friend you can't ping in an embed title
Second condition will not work
If args would be the mention including the <!@ ... string you won’t be able to search the cache including that string and the id
the second condition is for ID
Hmm but it’s needs to be the id or exact name to trigger the second condition
yap, The first is for a mention, second for the ID, and third if no have mentions
Yeah as I said it depends on how and what he enters
yap
If he’s still getting the id only as result the user isn’t cached
That’s his only issue
yea?
That’s why I said he can take the mention.id and search the cache or fetch the member
Yeah but your suggestion will still not work if he mentioned a user which isn’t cached for whatever reason
That would require to search the cache or force a fetch
not all members are cached?
Huh depends if you’ve enabled it or it
And sometimes some things aren’t getting cached properly for reasons 
That’s the reason you can force a fetch
woah, interesting
I don’t need caching for example and disabled it
is better?
Always depends on your purpose of course
My bot just requires to fetch external APIs and my databases and doesn’t need any cached user data, roles, emojis etc.
If your bot has to deal with users, permissions, roles etc. it won’t make sense to disable just to fetch it all the time u need it
My bots used to cache only roles and permission overwrites
yeah, same... My bot use to roles and emojis
It all depends on what your doing
Aye to be more detailed I’m caching the same only caused by a few privileged commands users with specific permissions can use only
woah
Sleep well
Nights man 
😘
gn guys
which is better? an sql db or mongo db? caz i have both extenetions to do with both of them on vsc installed and want to know which one is best iin terms of memory
and stuff
i cant give much input on mongo, but sql is really good in terms of performance
specially postgres
oooh ok
It really depends on the data you're storing
i think i got a a couple hundread million entries on postgres and its using less than 2gb
but the tables are quite huge
well im storing bans, warns etc and having an eco system so
You can use either one
yes please
how good is it in perfomancce?
and do i have to install it?
redis is meant to be abused
im using a 32bit laptop so
its linux only, so keep that in mind
oh
you'll need to install a vm for it
well then i cant
i got it running on windows
you sure can
im on windows
and using redis on a vm
wls
bit you gotta think
i got to host it locally right?
no, i got both
i got a development server(locally) and a production server(on a server)
because i dont want to run something locally more than i have to
i dont have as erver so
my point being, you can run it locally
even more reason to use redis
so that gets capped pretty easy
since its memory persistent
you gotta do research on what you need tbh, its use case
right ool for right job
redis is amazing cuz its meant to be abused
ye
redis is crazy fast, but for a cold storage i would still use SQL or NoSQL
and redis maybe for caching
@lusty quest @safe creek
wow
i know
like i said, right tool for right job
wow they love being slapped on the ass eh xd
but like i said, its completely up to your app
i wouldnt recommend going this overkill unless you got a reason to do it
the reason why i recommended redis for you is to use your ram instead of your disk write speed
not because it can do a lot of ops
i have MongoDB storing stuff and then redis as a cache to not hammer Mongo with a request on each message
ram is faster than disk
true
by a mile
also Mongo dont cache in ram unless you get a License
so you could use the fact that redis uses ram to take care of your slow disk write/read speeds for memory
i still need to switch my hdd with an sdd and upgrade from 32bit to 64
but i gotta pip install so much again then
what are the specs of your laptop? maybe getting a Raspberry Pi would be smarter
you could also use a cloud db like mongoDB atlas
you could alternatively keep stuff in memory instead of using a db
is dual booting good?
you want me to send them?
use a normal db for persistent data, load in memory lazily
i have windows right now, so ig maybe i also download ubuntu
if so give me 2
or run VMs
my dad duel boots and its sick
for creating VMs or running WSL over a VM?
here we go, windows and ubuntu together
idk shit abut vms and stuff
i have a Ubuntu VM running in my FreeBSD NAS, its quite easy if you understand how
but WSL is way easyer
Install a graphical user interface (GUI) with Ubuntu 20.04 running within WSL 2 on a Windows 10 computer. Microsoft have announced that an RDP based GUI will be added to WSL2, but it's not currently available. I'll show you how to get a GUI installed and how to connect to the GUI using remote desktop so you can start using that today.
Menu:
Ove...
i dont use them
heres my specs
the ONLY reason i installed the GUI locally is that i absolutely despise tree navigation from terminal
is it any good?
ls cd ls cd something etc
just need a sdd instead of an hdd
tbh i expected worse specs. but why a 32bit os?
thats how we bought it, were gonn aupgrade it soon
ive tryed remote desktop on linux, but terminal is king
im unable to work with anything below 12Gb ram
when we have time
but my disk is hdd and not sdd
so it has a hard time with the disk
but it does
it dont
if you cant figure out how to navigate in a terminal install midnight commander
because it cant handle vsc, discord and 1 - 2 chrome tabs
i absolutely doubt you're going to be capping your write/read speeds running a simple db
how old is the laptop?
then at that point why not invest in a raspberry pi?
idk we bought it from some guy in france from ebay
i will when i have the cash
well better go for a RPI and you will be better set
mmmk
though if you plan on upgrading your pc, there wont be much gain apart from electricity
but you might want to invest also into a External HDD or SSD for the PI bcs the SD card will die fast if you have everything running off it
if you plan on selfhosting a bot, you'll need to keep your pc on 24/7
alternatively you could pay 5-10$ a month for a vps
my battery broke so i habve to keep my cord in
which would solve all of your issues
plus it dont matter
since in the uk we have thexse keys
we put money on
to get electric
so we dont really pay bills? depending where you live
and if the house uses them or not
so electric is np
yes ik
im hosting my bot and laptop
cuz it'll keep on the outlet 24/7
i dont have a battery
that'll destroy your batter in a couple days
just pointing it out
you wont be able to use, whats literally the only gain from a laptop, which is portability
get a RPI, will use way less power and will probably run better
if you dont need the RPI anymore install a pihole on it and block ads with it
they are sometimes annoying
yup
also pihole will block tracker
some apps send telemetry data back, Pi Hole will block the DNS requests for those
so they run into a void and never reach its destination
i see
Just use ghostery
you need a subscription for full tracker blocking, a Pihole is probably cheaper in the long run
@slender thistle i've wasted almost 2 hours debugging the webhook code
just to realize my server is having a random 500 error moment with not letting me make them 
i had to test making webhooks myself and even i wasn't allowed
FFS discord
you could install it on a VPS and use it to block ads on your Phone on the go
but you might have to whitelist here and there some websites, if you get a DNS resolving error for a page you want to visit you have probably to check if it got blocked by the pihole
Does it block nsfw sites too ?
loggers
Time to set up pi a hole
I’ll be unrickrollable
I’ll blacklist those too
you cant or discord wont work
You cant blacklist my rickroll api
It gives random rickroll vids and gifs from random sites
does anyone know what's the thing called to disable discord.js-commando default error respond
client.registry
.registerDefaultTypes()
.registerDefaultGroups()
.registerDefaultCommands({
help: false,
prefix: false,
ping: false,
_eval: false,
unknownCommand: false,
commandState: false
});
well it works
and i mean
"works" as in this shit https://i.imgur.com/TSdfCXH.png
been trying to fight this astoundingly stupid bug for hours now for whatever reason it keeps looping
the bot thinks that it has the translation role of the server im using even though it doesn't
wtf
my current workaround is introducing a boolean variable that goes from a false to true state once the bot finishes its first translation request to my API
that way it literally is unable to access the same iteration process
but now i've realized that webhook rate limits are nasty 
i'm really happy that the automatic toggle on/off command works and that the formatting of webhooks is working perfectly
and as soon as i can get rid of the loop problem, i can do last-minute code cleanup and it will be exactly the way i want it to be
`import discord
from discord.ext import commands
client = commands.Bot(command_prefix= '+')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('BACK2BACK ESPROTS'))
#PERFORM STUFF.....
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HELLO I AM OFFICIAL BOT OF BACK2BACK ESPORTS!')
@client.event
async def on_message(message):
if message.content == 'what is the version':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('The version is 1.0!')
if message.content == 'Hi':
general_channel = client.get_channel(814085894561857546)
if message.content == '+info':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HI I AM OFFICIAL BOT OF BACK2BACK ESPORTS CURRENTLY I AM UNDER DEVELOPMENT')
if message.content == '+embed':
general_channel = client.get_channel(814085894561857546)
myEmebed.set_header("BACK2BACK ESPORTS")
myEmebed = discord.Embed(title="INFO OF SERVER",description="OWNER OF BACK2BACK ESPORTS IS DOPE",color=#b42222)
myEmbed.set_footer("THIS IS A ESPORTS SERVER ORGANIZING T-3,T-2,T-1 CUSTOMS")
myEmbed.set_author(name="B2B𒉽DOPE")
await general_channel.send(embed=myEmebed)`
Error coming can anyone help?
How could I make my bot return 300k instead of 300000? Code:
db.fetch("balance."+message.author.id);
Or atleast have comma’s
LMFAO
Poor you
What the fuck
Lol
on avg the rate limits on webhooks are 35 mins

i want that to further exemplify my feeling of pain
Lol
-
For hex you do 0x, not # which is comments in Python
-
There's no "header" in embeds. Do you mean the title or author field?
`import discord
from discord.ext import commands
client = commands.Bot(command_prefix= '+')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('BACK2BACK ESPROTS'))
#PERFORM STUFF.....
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HELLO I AM OFFICIAL BOT OF BACK2BACK ESPORTS!')
@client.event
async def on_message(message):
if message.content == 'what is the version':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('The version is 1.0!')
if message.content == 'Hi':
general_channel = client.get_channel(814085894561857546)
if message.content == '+info':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HI I AM OFFICIAL BOT OF BACK2BACK ESPORTS CURRENTLY I AM UNDER DEVELOPMENT')
if message.content == '+embed':
general_channel = client.get_channel(814085894561857546)
myEmebed.set_header("BACK2BACK ESPORTS")
myEmebed = discord.Embed(title="INFO OF SERVER",description="OWNER OF BACK2BACK ESPORTS IS DOPE",color='b42222')
myEmbed.set_footer("THIS IS A ESPORTS SERVER ORGANIZING T-3,T-2,T-1 CUSTOMS")
await general_channel.send(embed=myEmebed)`
Now also error
can we talk about how this code literally doesn't work
Still didn't fix the header part
if (error):
don't()
Also why are you using commands.Bot without even using its commands extension
i need help developing my bot
youtube
this isn't the support server
Hm?
this isn't the support server
this isn't the support server
go to their bot page and select "Get Support"
it'll redirect you to top.gg/bot/<id>
use discord.gg/<id>
because site's broken 🧠
wheres the support botton
on the website
i cant find it
what's the bot name?
this bot
i cant summit it
oh were you talking about your own bot
what do you even need help with?
well never mind then
@proud rain
what did you write on other bot owners
My cousin is the other owner
Ohh
this is ur id
Screenshots are crying rn
@flat pelican if only windows had native screenshots natively
it has?
i cant press copy id
Just pressing prntScreen should take the entire screen
What’s prtsrn
i just use shareX. easier that way
i said natively
What’s that?

without needing for external tools
i use sharex too
but windows has screenshotting tools by itself
yea. windows shift s
nothing, ignore it
its likely not related to their issue
the issue is just not reading what the popup says

can you copy my id please
i did already
so i can copy it
already did
put it in here
724425056469647430
already did
188836645670223872 no this is the right one

anyhow, back to work
`import discord
from discord.ext import commands
client = commands.Bot(command_prefix= '+')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('BACK2BACK ESPROTS'))
#PERFORM STUFF.....
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HELLO I AM OFFICIAL BOT OF BACK2BACK ESPORTS!')
@client.event
async def on_message(message):
if message.content == 'what is the version':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('The version is 1.0!')
if message.content == 'Hi':
general_channel = client.get_channel(814085894561857546)
if message.content == '+info':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HI I AM OFFICIAL BOT OF BACK2BACK ESPORTS CURRENTLY I AM UNDER DEVELOPMENT')
if message.content == '+embed':
general_channel = client.get_channel(814085894561857546)
myEmbed.set_header("INFO")
myEmebed = discord.Embed(title="INFO OF SERVER",description="OWNER OF BACK2BACK ESPORTS IS DOPE",color=0xd34545)
myEmbed.set_footer("THIS IS A ESPORTS SERVER ORGANIZING T-3,T-2,T-1 CUSTOMS")
await general_channel.send(embed=myEmebed)`
Error coming
How do I get an approval @opal plank
by being patient
also imma go work now
😂
Ok
qt above
No
👉👈
i may or may not have drank over 2 and a half liters of energy drinks
i can help you
you're not sane
what is your problem ?
What happens when my bot does get approved? @opal plank
that was never in question
imma bonk you
Lol
What did this called in the Permissions.FLAG ??
😂
manage_channel
with discord.py
Does it notify @opal plank me?
how can i add my bot here ?
@opal plank help
On my email?
aight fuck it, bye
...
Lol 😂
Mhm go to discord bot developer first
wdym it doesnt?
i hope so :3
anyway, back to work
someones needs help? Wow I took a looooooooonnnnnnnnnnnnnnnnggggggggg break from bot development
that is for all channels
i wanted like
<Channel>.permissionsFor(<Bot>).has("MANAGE_CHANNEL")
to manage only this channel
unrelated to your issue
:)?
how do i set a custom error handler for discord.js commando
yeah
you never asked how to get permissions in guild or channel specifically
this was ur question
so they are same things?
me.permissionsIn(<channel>).has(<perm>)
ok
`import discord
from discord.ext import commands
client = commands.Bot(command_prefix= '+')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('BACK2BACK ESPROTS'))
#PERFORM STUFF.....
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HELLO I AM OFFICIAL BOT OF BACK2BACK ESPORTS!')
@client.event
async def on_message(message):
if message.content == 'what is the version':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('The version is 1.0!')
if message.content == 'Hi':
general_channel = client.get_channel(814085894561857546)
if message.content == '+info':
general_channel = client.get_channel(814085894561857546)
await general_channel.send('HI I AM OFFICIAL BOT OF BACK2BACK ESPORTS CURRENTLY I AM UNDER DEVELOPMENT')
if message.content == '+embed':
general_channel = client.get_channel(814085894561857546)
myEmbed = discord.Embed(title="INFO OF SERVER",description="OWNER OF BACK2BACK ESPORTS IS DOPE",color=0xd34545)
myEmbed.set_header("INFO")
myEmbed.set_footer("THIS IS A ESPORTS SERVER ORGANIZING T-3,T-2,T-1 CUSTOMS")
await general_channel.send(embed=myEmbed)`
Can anyone help?
How many times have I told you that set_header doesn't exist?
Ok
Sorry
How could I make my bot return 300k instead of 300000? Code:
db.fetch("balance."+message.author.id);
Also
What are the errors that you're getting
You posted your code multiple times and literally only said "error happening"
https://www.npmjs.com/package/human-readable-numbers take a look at that
not necessarily telling you to use the package, but perhaps check their codebase
can I access static property of a class from an instance or this in js
i feel i have done this completely wrong
m = "<@!>"
@has_permissions(ban_members=True)
@commands.command()
async def unban(self, ctx, *, member, m):
banned_user = await ctx.guild.bans()
member_name, member_descriminator = m.split("<@!>")
for ban_entry in banned_user:
user = ban_entry.user
if (user.name, user.descriminator) == (member_name, member_descriminator):
await ctx.guild.unban(user)
embed = discord.Embed(title=f"{user.mention}unbanned by {ctx.author.id}"),
await ctx.send(embed=embed)
return```
is this even partly correct?
No
i knew it
oh ok
wait you can compare lists and tuples?
Hold on
so what about m = blah blah
Not even
Yeah
because ive tried it like this ```py
@has_permissions(ban_members=True)
@commands.command()
async def unban(self, ctx, *, member):
banned_user = await ctx.guild.bans()
member_name, member_descriminator = member.split("<@!>")
for ban_entry in banned_user:
user = ban_entry.user
if (user.name, user.descriminator) == (member_name, member_descriminator):
await ctx.guild.unban(user)
embed = discord.Embed(title=f"{user.mention}unbanned by {ctx.author.id}"),
await ctx.send(embed=embed)
return```
>>> one, two = 1, 2
>>> (one, two) == (1, 2)
True
Did you mean strip or split
😛
and what are you using
i put split

how do you get discrim by splitting like that
idk dont ask
ive never used split or strip before so
if you want the id use strip("<@!>")
member_name, member_descriminator = member.strip("<@!>")
ValueError: too many values to unpack (expected 2)```
use type annotations
You’re a life saver
yw
Needed it because its hard to read say "10848291"
async def unban(self, ctx, *, member: discord.Member):
``` so like this?
Yes
mmk
adding a db is gonna be a nightmare
for me anyway
im somehow mentioning a user called @daring fjord
who tf is that?
clyde
oh
huh
ok so t works but
it cant find the user with the id
discord.ext.commands.errors.MemberNotFound: Member "@rugged ice" not found.
Not gonna work well
yeah i found that out
it apparently couldnt find the user whos banned with that id tho i copied the correct id?
oh because it's a user
yay time to wait another 5mins for the bot to properly shutdown
either discord.User (probably won't work if the user isn't cached) or parse the user yourself
ill try using discord.User and if that odesnt work i give up on the command for the moment
parsing seems easier, you already got it
that wouldve been nice to know a bit sooner tbh.... :/
so what do i do with the member: discord.User?
just replace : discord.User with an colon and the id thingy?
also
File "c:\Users\forth\OneDrive\Documents\kigles\cogs\moderation.py", line 66, in unban
member_name, member_descriminator, id = member.strip("<@!>")
ValueError: too many values to unpack (expected 3) ```
mmmk
well ive erase the : discord.User part
so im left with member
@slender thistle
member is now a string, supposedly mention
member = member.strip(...)
member is now an ID
im confused on what to do now as i was litterally just told to add discord.Member but then replace memeber with user but then add id = strip("<@!>")
mmmk
so
delete the other member stuff or?
remove user also
async def unban(self, ctx, member):
member = member.strip("<@!>")
...
mmmk ty
also
should i just leave if (user.name, user.descriminator) == (member): like that
oh wait nvm



