#development
1 messages · Page 1268 of 1
Sigh
@whole scarab he gave u a example of json
Can someone help me ._.
not an answer key
Just add a comma after every value except the last one
Why? Because JSON
@earnest phoenix are you sure you're not sending excessive number of requests with your code
Only 1 request
DSL has manage roles permission
but the edit page still error
anyone try this function?
@slender thistle, please help me to solve the problem! (yellow circle and arrow part)
It says, "⚠️ String does not match the pattern of "^(?:@[a-z0-9-~][a-z0-9-.~]*/)?[a-z0-9-~][a-z0-9-.~]*$"."
What the fuck
@whole scarab using lower string
What is lower string?
f not F
Why does it require lowercase string
doesn't node already make a package when you run npm init
and this is why there is node json auto builders
@earnest phoenix
Finally, all problem solved! Thank you! Thank you! Thank you! Thank you so much!😘😘😘😘😘😘😘
so whos going to say it
@whole scarab lowercase only i think
just read the error
read the regexp
pattern
You know
They might not be familiar with regex if I had to tell them to add commas after values
oh
true
well i mean
theres nothing to be ashamed of
@whole scarab now u know: commas after values in json
Indeed. It's the hesitation to re-ask that's bugging me in this case
and the next step is
Step 8: Open your computer’s “Command Prompt” and navigate to your Discord bot folder
but I use MacBook Air
Through some integration with Discord in server settings afaik
Step 8: Open your computer’s “Command Prompt” and navigate to your Discord bot folder
@slender thistle, please help me to do step 8
@whole scarab press the terminal button at the top
next to run and to the left of help
then click new terminal
then do node bot.js whatever it is your instruction thing says to do
it should start the bot
@whole scarab press the terminal button at the top
@hollow fjord, but I use MacBook Air!
@whole scarab shouldnt matter
it wont matter, node runs the same.
why would send not work in this
channelid.send```
you dont just send code and leave
send code when your here
especially like that flood one
@client.event
async def on_message_edit(before, after, message):
idofguild= str(message.guild.id)
for path in pathlib.Path(idofguild).iterdir():
if path.is_file():
if path.name== "channels.json":
with open(path, "r") as json_file:
datd= json.load(json_file)
channeldeleted= datd.get('audit_log_channel')
embed = discord.Embed(
timestamp=after.created_at,
description = f"<@!{before.author.id}>**'s message was edited in** <#{before.channel.id}>.",
colour = discord.Colour(0x00FF00)
)
embed.set_author(name=f'{before.author.name}#{before.author.discriminator}', icon_url=before.author.avatar_url)
embed.set_footer(text=f"Author ID:{before.author.id} • Message ID: {before.id}")
embed.add_field(name='Before:', value=before.content, inline=False)
embed.add_field(name="After:", value=after.content, inline=False)
channel = client.get_channel(channeldeleted)
await channel.send(embed=embed)```not working? error: ```Ignoring exception in on_message_edit
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 312, in _run_event
await coro(*args, **kwargs)
TypeError: on_message_edit() missing 1 required positional argument: 'message'```
for some time
I go to the terminal already, what should I type now?
i dont know i dont use advanced code like that
@astral yoke, I go to the terminal already, what should I type now?@c
i dont know py
ok
@modest smelt u are missing a parameter in the function call
TypeError: on_message_edit() missing 1 required positional argument: 'message'```
@modest smelt u are missing a parameter in the function call
@earnest phoenix yes ik
how to fix that?
let me check here
kk
which ones?
before and after
before and after
yes ik
but i want it so that, it will send in a specific channel
wait what
and i need to get the guild id for that
and i need to pass message as one of the params
idk man
i think so
i dont do much discord.py
it might be ctx.message.guild.id
unless if ctx is the message which idk
ok
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#context
@earnest phoenix what about this?
that is api docs on the command context type
read up on them
go see where u can get the guild type from
how will that help?
yeah
no i figured out how to do that
reading the docs is one of the best things u can do
ctx.message.guild.id or message.guild.id
ig
@earnest phoenix do u know if there is a discord py server? and if yes can u send invite link?
oh
@astral yoke, I go to the terminal already, what should I type now?
how do we get developer role?
@whole scarab type node bot.js
command not found
install nodejs first
1. Recommended, but optional: Learn how terminals work
2. Install nodejs
3. node yourbotmainfile.js```
command not found
are u on a vps / sshed into a device or can u access google?
cause theres curl or nodejs's website
i assume youre on debian based vps: sudo apt install nodejs
(if ur on ubuntu 18.04 or older, you need to use curl)
(otherwise you get nodejs 8)
i have a message
how do i get the channel's id where it was sent?
@earnest phoenix
jesus lmao
sry ur the only python dev ik
I do python too
can u help?
😋
i have a message
how do i get the channel's id where it was sent?
Well im not close to my pc so not rn i can help u in 8 hours
I'm tryna to use Firebase Cloud Fucktions to host my botum and oh boi it is a fucking awesome
Can anyone help me please??
@earnest phoenix https://dontasktoask.com
ban method keeps giving me the Response: Internal Server Error error
the code is not modified, so it's not a code issue
I wanna create like this
That looks like it's using a Stopwatch package if it's made in d.js
is this the right way to check for perms?
if (!message.guild.me.hasPermission(permission)) return 2;```
Ahhh if permission variable is a string then yes it is
yes it is
Then yes
using it as a func so i can later do
const perm = 'ADMINISTRATOR';
const hasPerm = func.hasPermission(perm, message);
if (hasPerm == 1) return func.errEmbed(`Missing permission \`${perm}\``, message);
if (hasPerm == 2) return func.errEmbed(`Missing permission \`${perm}\``, message);
I would put that in a else if but it doesn't need to be
what in else ?
Else if?
if (hasPerm == 1) {}
else if (hasPerm == 2) {}
Mhm. It doesn't have to be, but else if basically check if the first if is false, then it checks it's condition, if it is true it doesn't produced to the next else if, or else statement. If statements check only it's condition, then continues. You can think of else if like a switch case.
well I have return in both ifs so it wont continue anyway?
Mhm that's why I said it doesn't have to be, but for code style it's good practice to use else if over two if statements that is checking a similar condition.
Np
The only time you would use if statements in a series is if you are creating a check. It really depends on what is needed to do. You can find a lot about else if and if statements online and find when it's good to use else if and two ifs.
@summer acorn show code
it is probably you are using string instead of object for reason
- .ban('reason')
+ .ban({ reason: 'ads'})```
no?
That's not the issue?
this used to work
?
@summer torrent
What's the error?
my error is Internal Server Error
You should be using the ban method on the GuildMember Type
no?
that could only ban if the member is in the server
let's say someone sends nsfw and then leaves, that method wouldn't be able to ban them as they wouldn't be a member of the server
this aint discord-tech-support
@summer acorn what method do you use exactly
@tight plinth message.guild.members.ban(user.id)
const Discord = require('discord.py')
that is js
Can't it be message.guild.ban
kekw

const Discord = require('discord.py')
@gilded lily please see a doctor
@summer acorn fetch the member and ban it
npm I python
lol I was jk sorry
Lumap, the error is not in my code
yes ik
it's an Internal Server Error
Is it a 500 or 400 status code?
but try a different method
the issue is in the requestHandler in djs
hold on, let me actually check the djs code real quick
it's an Internal Server Error
@summer acorn the server is just mimicking the human body at 3 a.m. iirc

@summer acorn that error is triggered by discord, it's not discord.js fault
wait for them to fix their servers ig
it has persisted for like 3 days kekw
<@&330168063729074177> hewwo
https://discord.com/oauth/authorize?redirect_uri=https://1661(4(1#1"2'8((:::pekejsolqmwns*

does anyone knows how to add a server count to a webpage for html or something
@summer acorn did you contacted support/trying to update d.js
My bot what time verified
who knows :D
uh
what is the average verification time?
ive waited 5 weeks
5 weeks and 2 days
5-6 weeks
@carmine summit 7+ weeks
{ date: { date: '9:41am 25-Sep-2020 (UTC 0)', reason: ' hsufsdujfd' } }
got this, and using quick.db: db.delete(`${user.id}.modlog[0]`);, it deltes it and makes it null, how to delete that whole thing istead of just leaving null
null is like undefined
Not sure if I should ask here or in #support, so feel free to redirect me.
I'm helping someone get a nice look going for their bot's top.gg page, but stuff is going wrong and breaking.
Does it have to be pure CSS/HTML? Since the page got pretty much wiped when I tried repositioning and rebuilding some stuff with a few lines of JS
@silver lintel null = literally nothing
Running the same code on the console works perfectly fine though
null is like undefined
@tight plinth Not at all, undefined means no pointers to and from what you request, null is an empty object that means no value
when i do db.ge(`${user.id}.modlog[0]`);, it comes with null
null is nothing
ok
(ping) Not at all, undefined means no pointers to and from what you request, null is an empty object that means no value
glad that some languages came into idea to use nullptr instead of undefined.
@tight plinth Not at all, undefined means no pointers to and from what you request, null is an empty object that means no value
@eternal sandal in both cases you can dojs if (!value)which returns true with undefined and null so
they are kinda the same
not exactly but u get it
and if we r talking JS, its probably reference than pointer
in both cases you can do
if (!value) ``` which returns true with undefined and null so
That also returns true on an empty string, numerical 0 and any other object that represents no value other than a memory pointer or an empty object. Are you saying those are all the same as undefined?
I'll take my question to support though. It's getting kinda drowned out here and it does specifically have to do with top.gg
@eternal sandal well almost all objects they are either null/empty returns false. 0 is false and 1 is true btw, like in binary

sup
@restive furnace yep
i need help
@blazing ravine ok
read docs ig
just use eazyrp if ur not going to make a game
I just gave you a list of stuff that returns false, I think I can make an educated guess on what returns true.
Which, when casting to boolean values (true/false) is any number that is not 0* or evaluates to that and any object that contains one or more bytes of data.
- Some languages evaluate negative numbers to false as well
- Some languages evaluate negative numbers to false as well
languages which does not have signed integers
Now I'm back to attempting to make this top.gg page look good without any lines of JS because that apparently gets blocked

Isn't that exactly what I just said?
but who needs JS to make the page beatiful
Having issues with not getting it to break everything though
but who needs JS to make the page beatiful
I lowkey do when the existing HTML/CSS is just a hot mess
are you logging in
Have you tried setting the timestamp to a future point in time?
anyone got a good website to make a bot for discord?
@blazing ravine open discord.exe on ur pc/or what ever os ur on
anyone got a good website to make a bot for discord?
@forest dock are you looking for a bot maker (like discord bot maker)?
umm im not really sure lol. i just need a reliable app/website to create a bot for a discord server im in. if you recommend a bot maker then ill happily listen
The only one that comes to mind is DIscord Bot Maker.
You have less control when you use a bot maker, but if you want to go ahead, go ahead.
There's also bot ghost (like free said) but that one's a bit eh
lmao imagine using a bot maker
Imagine not being respectful of people's decisions
It's fine to use a bot maker if all you need is something simple (aka giving up control) and don't want to take the time to learn programming. I think a lot of people just hold a grudge against it because:
- They know how to code, and seeing someone else use a bot maker gives them a superiority feeling.
- It's not cut out for full on production use.
depends on what it does
Imagine not being respectful of people's decisions
@slender thistle well i wasn't being disrespectful was i?
lmao imagine using a bot maker
i was imagining that's all
The way you phrased it does sound like you are straight up shitting on bot makers
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: PermissionError: [Errno 13] Permission denied: 'output.png'
error im getting
can any1 exkoain it?
tbh also botghost works
explain*
Didnt even know bot makers exist. Gonna check it out
anyone got a good website to make a bot for discord?
@forest dock Someone sent this a while ago. It's actually a great resource https://anidiots.guide/first-bot
thanks
but who needs JS to make the page beatiful
@restive furnace reminds me of this https://discordapp.com/channels/264445053596991498/264445053596991498/356011696806166528
lol
how do i make sort a .json file in discord.js? sorry if i don't make sense im new to this
Ah install scripts
how do i make sort a .json file in discord.js? sorry if i don't make sense im new to this
@west agate What do you want to sort the JSON on? You could use a sort function and overwrite the object, though usually JSON shouldn't be sorted since it's key-value pairs rather than indexed or sorted collections
- dont use json
@drifting wedge JSON is fine for immutable data
Like a config file that doesn't change
JSON is also fine for carrying data across instances
it's fine for mutable data too technically as long as you know your shit
Like a config file that doesn't change
@faint prism fair

@west agate What do you want to sort the JSON on? You could use a sort function and overwrite the object, though usually JSON shouldn't be sorted since it's key-value pairs rather than indexed or sorted collections
@eternal sandal like a leaderboard
i mean dont use json if ur editing it a lot
it's fine for mutable data too technically as long as you know your shit
@slender thistle you mean to reading and writing to it constantly lol


What if I want to make a very minimalistic script and don't want a database
Use a database
I'm not saying R/W to it constantly
yeah I give up on trying to defend JSON databases
Good
oh..
good
okay then
you should never have tried defending them
there are uses for json database, I don't think discord bots fit that category though
It's a serialized object, not a replacement for databases
I sure as fuck don't want a database to update my credentials every few minutes/hours though
If you're json database is just a collection or array of some mutable data/records, you need a proper database.
what if it's a JSON full of strings as keys and integers as values
still pls no
yeah I give up on trying to defend JSON databases
for DBs, there's much better formats than JSON.
But for small bits of data where a DB is overkill, JSON can be fine. I run a private bot from my bedroom where I store data like reminders and what servers it's in so I can quickly load it in and kill the file I/O process instead of setting up a full DB connection. Arguably I could run SQLite, but I'm actually trying to keep it free of external dependencies
what if it's a JSON full of strings as keys and integers as values
@slender thistle Are you rewriting the file multiple times per second?
I sure as fuck don't want a database to update my credentials every few minutes/hours though
that might be spaced out enough to work.
But it isn't a secure format to store creds
and since it does update you probably just need a database
I wouldn’t use it to store anything tbf
Is there a way to check if user has open dms?
i can just re-request my credentials again and store them again
@tidal marlin only by sending a DM and catching an exception
I can see using it to dump data between process restarts ig
Yup
I used to cache my access token but had to restart my process all the time during testing
And that's literally all I use it for
which is a bit bleh
So it's basically an error without way to do
else
@tidal marlin wrap it in a try-catch block to not die on errors
¯_(ツ)_/¯
I use json to dump my db cache every few minutes
A JSON "databse" is fine for very basic shit so I don't see where all the "never use json for db" comes from, even if the user doesn't seem dumb enough to handle simple stuff like writing to/reading from a file multiple times within a second
why is it fine
there are uses for json database, I don't think discord bots fit that category though
@woeful pike for discord bits the only time where you use jdon db os to store things like prefix, token or other static stuff
I get security etc etc but let's talk about very basic scripts
I use json to dump my db cache every few minutes
@misty sigil That'd be slower to query than a db though
I'm not saying it's "fine" exactly. I'm just saying it may work just fine for a basic script.
whoops my bad stan
I get security etc etc but let's talk about very basic scripts
@slender thistle what, where security is irrelevant?
the db cache is in RAM
Pretty much you could say so
I did use JSON for my school assignment script at some point and I fucked around with it just fine
I use JSON for bot config (token, other data that's immutable for the bot) and tiny bits of info that I only need to read once when starting.
And then I have this JSON file for my RSS reader that couples a webhook link to an array of RSS feeds since it's a really lazy approach to run
I do
What db?
mongo

The JSON never gets written over by the bot, except for restart data dumps IF there was a change
Can you tell me how do I start?
Like I can't figure out what to do after getting db data
I just shove stuff into ram with a timeout to remove it
The JSON never gets written over by the bot, except for restart data dumps IF there was a change
@eternal sandal That sounds like a valid use
That is a valid use
Matt, I don't know how to obtain certain user from that cache

That's why bot is so slow
stan please stop talking, I'm reading all your messages in Clarkson's voice and it's making me laugh too hard
It’s goes from 2ms to 0ms with cache
I really need to figure out how to get certain user from db without requesting

The same as you

Where hosted
ş
Germany
speaking of cache my Twitch cache is finally behaving after yesterday's patch
whatever was happening before, one of the premature fixes i attempted worked
hey if i try this https://www.devdungeon.com/content/javascript-discord-bot-tutorial
@narrow cloak https://discordjs.guide/ use this one instead
@narrow cloak https://discordjs.guide/ use this one instead
@opal plank ok bro i try
What does token link to?

@hoary hill first of all you would have to have a code block so that it is monospace text
Still, "Bot token"
Why.
Then make sure the text of the left are padded so they gave the same width
You can code block in an embed
Unfortunately you can't get your result without code block (or it would be difficult and not look good)
how?
@violet mesa have a list of them
How is nobobdy getting worried on the "Bot token" Thing
["!","?"]
yes
Like that
yep
Ohh
do i like
namethatillchooselater = ["prefix1", "prefix2"]
bot = commands.Bot(command_prefix=namethatillchooselater)
@placid iron like that?
Yeah
ok cool thx
@hoary hill oof yeah you can't use link thing in code block.. uhhhhh you could just have the left text in code ?
Hyperlinks don't work on codeblocks btw
thats that then
You could remove the | perhaps as there is already the border
is that a bad or good thing?
make only owner be able to add it in the portal
¯_(ツ)_/¯
cant have private bots on dbl
you shouldnt be coding on your main branch btw
branch it off to a different bot, never test in production
😩
7-8 weeks ETA review be like
I don't understand how someone would make a test bot in development, add it to DBL, then wonder why it's in a lot of servers. 
Me: code in prod so that whole population are testers and bugs get found quickly
Me: SSG'es into my VPS through vscode to live edit the bot as it runs
Fix bugs right into production wooh!
its gateway payload
i dont think you should be patching nor hacking libraries to do that unless you clearly know what you doing[
Can i use this?
Lol
I still remember when I wanted to make a bot that could takes notes when you called it. But you can't call bots. (or you couldn't back then)
;-;

its not 'code to make indicator'
its the identification payload
dont fuck with stuff you dont understand
@dusty tulip coding a bot right on mobile? Bad idea. 100% absolutely horrible idea.
Uhh.....
mainly those 'undocumented' and 'grey' areas i do on my testing bot, such as live streaming with the bot
Not impossible to code on phone, but definitely so much pain
Coding on mobile is horrible, don't do it
Mobile devices like your handheld phone are not appropriate devices to create code. Phones:
- Are way too small. You can't see the whole line, or it's too small, or you scroll for days. Your eyes will suffer from this.
- Don't have a proper keyboard. Yeah there's a "hacker keyboard" but it's still going to be a painful endeavour to write proper syntax.
- Have horrible editors. There's some crap IDEs out there but they barely function to a level that's useful.
- Can't run a lot of bot code, and it's hard to do that in the first place. You can't run databases, sqlite, ffmpeg, canvas, or anything requiring more than core javascript. And running Termux is a pain in the ass, and it can't access your files (or your editor can't access the termux storage) without some intense technical gymnastics. That's if you have an Android, not an Apple phone, which can't even get that far.
- Getting help is hard because nobody wants to see your damn badly cropped screenshot showing your 25 facebook notifications from your mom inviting you to play farmville, or your 9% battery charge.
- Can't easily interact with online services like github to save/manage your code or upload it to your host.
If you really think you can code on a phone, you are horribly insane. That's your prerogative, but don't drag us into your insanity, we don't want anything to do with it.
cuz discord gonna enjoy a lot seeing that you are using undocumented shit for your bot

Dude may only have a phone
It pains me that we can't create tags in any bots
how useful would it be eh?
plenty of times have i sent tags here evie
https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/758810554482688071
https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/758154544487202836
https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/739324650043211917
https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/757692215723294831
all tags
I recall that was specifically the reason why I was using a selfbot - and particularly the reason why I was the only one with a special permission to use one on discord-developers until they finally added my Etiket bot to it and removed the special perm
This chat do be toxic tho
can someone help me
it sends this in my slowmode
}
^
SyntaxError: Unexpected token '}'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at C:\Users\Lenovo\Desktop\Yassin Folder\Games\more\bot23\handlers\command.js:5:23
at Array.map (<anonymous>)
at C:\Users\Lenovo\Desktop\Yassin Folder\Games\more\bot23\handlers\command.js:4:59```
@umbral zealot Other than the actual coding part. You can do almost anything you need to on a ubuntu machine to host a bot from a phone
"other than the coding part" lol
Voltrex did it, it's bad but it you only have a phone it's perfectly acceptable
I wouldn't shit on someone for it
hello?
or get $3 and a vpn
I mean it really depends. my own enmap module can't run on android because termux doesn't have a C++ compiler, so there's definitely limitations

you guys are already ignoring me ;-;
@tulip token state your question
@tulip token that's a syntax error there's not much we can do about it. you need to figure out what } or ) or whatever you're missing in your code, by looking through it
ok
use IDE
Whatever editor you're using, clicking on any (and I mean any) separator token such as parentheses, square brackets, curly braces, double and single quotes, will automatically highlight the one that matches it. The screenshot below shows this: the bottom curly brace is selected, and it shows the one on top by surrounding it with a square. Learn this, and how different functions and event handlers "look" like. Even in long bits of code, this works.
VSC usually tells you where the error is at
I mean it really depends. my own enmap module can't run on android because termux doesn't have a C++ compiler, so there's definitely limitations
@umbral zealot tbh I could probably write it as a xamarin app if I wanted a c-lang like C# :)
But then oh boy that's introduce a lot of issues
@tulip token go to command.js
I mean overall, every instance I've seen of someone writing a bot on mobile was horrible for us to help them debug anyway, like, a shitty screenshot of half your code? eh.
Like backgrounding and stuff
ok
line 4 or 5
ok
I mean overall, every instance I've seen of someone writing a bot on mobile was horrible for us to help them debug anyway, like, a shitty screenshot of half your code? eh.
@umbral zealot I just have a crontab pull GitHub repo occasionally and code from my desktop
i wonder if you could get a cheap vps or something and install a vm on it to at least run VSC
can someone help me
@tulip token you have a syntax error
coding on mobile, on pc
coding on mobile, on pc
@opal plank hosting on mobile, coding on pc
for example if 'true' == arg:
else:
yeah
@tulip token you have a syntax error
@faint prism bro i was just making a new command and then the error appears the code was working from a week now it doesnt'
0Exe im fairly certain py has an AND operator
if statement and statement do thing @drifting wedge
i recall py being a bit weird for my taste
@drifting wedge py if not(thing1 or thing2): print("runs")
I belive this should work
Not or is the same as not and not I think
Run if 2 false things
you have a boolean as a string.?
its complicated
but i just need to run something if arg is not true or false
this
Because that is what he asked..
for BOTH you'd need AND
both ok
if (!boolA && !boolB)
&&?
use ‘and’
if not boolA and not boolB
and operator in some languages
I did say
idk if py has && prolly does
i just recall and from my 5 mimutesnofmpython
I'd use what POOLED said
yes

what happen?
yeah that works too
but they shit on me because it doesn't have and bruh
oh right it should be and
o
And well, personal preferences but I prefer my method because it has less nots.
yeah that's the best mode, I love it
👀
me
toast
server invite link in the code?
is it possible for me to do dm commands if yes how?
you mean a bot to send you a dm with commands?
@violet mesa send the result to the author. in python this is ctx.author.send()
is it possible for me to do dm commands if yes how?
@violet mesa dude I literally post it
or your bot
no i mean u can do a command in dm
ah
yeeee
you can
yes but its hard
are you using python?
mostly it should just work if its a DM and it doesnt look for server stuff in the command
1 sec ill try
does your bot have a ping command @violet mesa ? try that in a DM and it should work
ah lmao
how do i change the background color of the detailed description box on bot page? im not familiar with html
ok thx but how do i do a command that only works in dmes if thats possible (sorry for alot of questions😅 )
that is possible
const Discord = require('discord.js');
const { prefix, token } = require('./config.json');
bot.on('message', message => {
if (message.content === '/help') {
const embed = new Discord.MessageEmbed()
.setColor(0xfff06e)
.setTitle('Help')
.addField('General Commands', `myavatar`)
.addField('Moderation Commands', `kick, ban`)
.addField('Support', `Invite me = [Here]()\nServer = [Here]()`)
.setFooter('Report Bot | Only MOD Commands is can be requested by the MODs')
.addField('User:', `:arrow_down:`)
.addField('You are:', message.author.username)
.addField('Requested in', message.guild.name)
message.channel.send(embed)
}
});
Why does my command handler dont work?
@opal plank
check channel type
nah
cuz thats not a command handler
how can i make atom give my discord a rich status?
cuz thats not a command handler
@opal plank then what is it
'dm', 'text' 'voice'
channels have a type annotation in them
thats just a command
ran on an event
thats it
ill just do one that works eather way
discord.py has special check for stuff like this
if it py?
i guess i can do suggtions in discord and dms
you can limit it to DMs easily without any checks in your own code
it is py
let me just find the docs link
then ignore me
Yes but I want it to put in a help.js so it can work? @opal plank
wait
no
how can I fix a command handler?
can i send all dms to me so i see the suggtions
by reading the docs and guides
or a diffrent way
https://img.rovi.me/tnm1yco8JU.png @violet mesa
hmm
do you use the @dense frostmmands before your commands? bruh
not all dmes only suggtions
donut = bot.get_user(415821990583336973)
await donut.send(things_to_send)```
as easy as that
just put that where you want to send a DM to you
things_to_send cause be arg and then it will give me answers sweet!!!! tysm!!!!!!!!!!!!!!!!!!!!
❤️
async def suggest(ctx, *, args)
do u need to add anything here?
How do I make dashboard
for my bot
basIc PYtHoN
How do I make dashboard:peepothink: for my bot
@hushed axle a dashboard is simple
its a website that edits a database
and your bot uses the same database
python:
be like:
me = Criminal()
print('im cool dabidebabidae')
I wouldn't go as far as saying dashboard is simple
I wouldn't go as far as saying dashboard is simple
@slender thistle the way it works is simple
not to make one
@placid iron how long did urs take?
dashboard makes me go AAAAAaaaAAAaaHHHH but it is worth it
Sure, the principle is simple. The realization is more painful
my one isnt even finished
dashboard makes me go AAAAAaaaAAAaaHHHH but it is worth it
@placid iron also u use mongo?
it works doe?
Can some one help me make a dashboard I never learn python
yeah and then the backend in whatever you want
@hushed axle you can code the backend in whatever you want
you don't specifically need Python
Backend can be done in any language that supports HTTP requests
ya
It starts with simple html. Then you make buttons. Then you make css, and think, ey, this aint so bad.
Then js comes in.
then middlewares
then logins
then database calls
Then not having await in code and getting into callback hell
Then cookies
rate limits
And then you realize how stupid of an idea that was
like pyton

its a python knockoff
sorry what
hmm I will try
i dont like vs code cuz i cant ZOOM IN
uh you can?
CTRL + =/+
Ctrl + =
what kind of advanced code editor doesn't have the ability to zoom
Ctrl + -
i just use atom
cuz yes
also cuz yes
i mean i dont think it matters
both are great
just preference
both are good but vsc better 

cuz it has a cool ass name
Why sometimes msg.member is null?
if(msg.member.hasPermission('MANAGE_CHANNELS')){
^
TypeError: Cannot read property 'hasPermission' of null
@earnest phoenix likely a dm
guys look at my profile
oh okay
atom editor :V
If i say the same thing its tagged as advertising
?
facts
and JUST get the streaming status
Can someone tell me why when somebody leaves my server from his own will I receive in the logs that he got kick
Why are the embeds the same?
also there is a slight chance of delay in your thing btw
i had some tests before with mass kick bots for raids, if multiple operations are done at once you might get the wrong person
How do I get a string to be used as upper or lower case?
ex: test = tEsT
alternating or random?
sorry:D
let str = '';
for(let letter in string) random() > 0.5 ? str += letter.touppercase : str += letter.tolowercase
something like that
thats one smort one liner btw
@knotty sigil It's emitted when the user gets kicked or leaves
so that means i can't know for sure who kicked him
that bit he got
you need to fetch from logs
though theres a delay iirc
i remember reading on DAPI why it takes a couple minutes to fetch it
specifically for Pollr
you could fetch last 5 after 5 minutes, and check for any entries with that use id
then check for the message type
(ban/kick)
i might actually do that now tbh
kinda bored
it's not that delayed, its mostly the bans that are from experience
Are you trying to check who kick them if they use an external bot or manually? If the answer to those is no and you just want to log it when they use the kick command on your own bot which I doubt then you could just build it into the kick command.
discord needs some consistency 😫
I usually had it to wait a couple hundred ms then fetch multiple entries with the same type and filter them until I get the correct log, if not post ??
i may actually do a function with a timeout with an await in it for 5 minutes, each 1 minute delay
bans sometimes take ages to log
think it'd be longer than 5?
do you remember back of your head the rate limits for fetching logs?
i might grab 10 or 20 accounts and attemp to mass ban them all and get a mean from all of them with a constant fetch in the audit
don't know them you should test
but it should be pretty fair
i sure hope d.js handles ratelimiting internally for audits
it handles all with a rate limit header if I'm correct
same thing was said in the other libs ive used

and then this
not in the mood to debug ratelimits anymore
im done with that stress

'its all handled internally until you join 150+ streams, then it kills itself'

make your own lib
very scalable
the worst part is that i NEED that big chunk to stress test my cache
need to make sure there arent any leaks, which are MUCH more apparent with a huge load of entries
anyhow, imma go code

i am making request !
but its showing pending and it not making user join guild
huh
See YT
and learn coding
somebody answer me
what version of ecmascript does node12 supports?
ok but did you resolve it
how to reslove
do you understand how javascript promises work?
probably not
@umbral zealot do you know how to make user join guild via Oauth
Read up on promises
;-;
Bot ghost isn’t even coding xD
And you cannot get approved to top gg with bot ghost
yup
Extreeme you know Oauth
guild_id = self.guild.id
@earnest phoenix not really no
in a cog, event how can i get the guild id?
What language?
which event
Yo guys
a lot of them
all im passing is self and member
Have error in leave word
what error
const queue = message.client.queue.get(message.guild.id);
well, it's still undefined
you're declaring it, but probably that guild doesn't have a queue
Can i make const queue = message.guild.id?
i guess?

Wait i give you code
const queuer = message.guild.id;
const queue = message.client.queuer.get;
thats why
'string' doesnt hhave a get() method
nor does queue exist
client.queuer isnt a thing
Message.querer.get?
learn a bit of objects in js first
specifically this
you have not
Wtf is going on
you dont know what an object is

'string'.get() isnt a thing
you havent checked the docs to see what client properties has
nor have you added one yourself
and you clearly arent reading the errors thrown by yoiur compiler
you lack almost everything you need to make a bot
Read the docs i sent you
For discord.js.. is there a way to only update a certain permission without removing all the others
11 minutes for what
bruh
jesus christ 11 minutes checking for bans?
its completely random and unpredictable

sometimes its instant sometimes its like 30 minutes
im doing ban command only work for people with perms to ban ```python
@commands.has_permissions(Ban=True)
i though the randomness would be much smaller
damn.. its rlly annoying when ur getting ignored
its really annoying not be patient
how to check if a user is a bot?
<user>.bot in d.js









just make a robot

