#development
1 messages · Page 1479 of 1
<a href='https://google.com' class="button";>INVITE</a>
from class?~
wait till they discover JSX
Also if it's for long description just use markdown
bro how would they customize it using css then
bruh
markdown still allows html to be used
the question is if top.gg is properly parsing it lmfao
that's exactly what i meant
btw im making a smol markdown lib to test my ts and regex skilz
top.gg does not allow anchor links for some reason
all hyperlinks are converted to about="_blank"
@commands.command(name="npwd", aliases=['newphonewhodis'])
@commands.is_owner()
async def test(self, ctx, arg=None):
if arg == None:
inboxselect = random.choice(inbox)
replyselect = random.choice(reply)
print(f'''Chose the following:
INBOX:
{inboxselect}
REPLY:
{replyselect}
''')
embed = discord.Embed(
title='NEW PHONE, WHO DIS?',
type='rich',
description=f'''
INOBX:
{inboxselect}
REPLY:
{replyselect}
''')
embed.set_author(name=ctx.author, icon_url=str(ctx.author.avatar_url))
embed.set_footer(text="What Do You Meme? | Coded by LIPD Productions Inc.#1205", icon_url=str(ctx.guild.icon_url))
embed.timestamp=datetime.datetime.utcnow()
await ctx.send(embed=embed)
elif arg == 'nsfw':
if isinstance(ctx.author, discord.Member) and discord.TextChannel.is_nsfw == True:
await ctx.send('Success!')
Language: Python
Issue: No output from nsfw arg
it's just a default value and there's handling for it
wait no that'd be a default val
have you tried logging arg
print(arg)?
i guess yea
you should also test which if it enters
test everything lmao
pretty much
sad debugger noises
you haven't experienced true debugging hell until you debug a CI/CD
Yeah, it sees the arg as nsfw
isn't discord referencing the package and the classes directly
you need a reference to the instance of the object
not the class
why are you using an instance of discord.TextChannel

you can check if ctx.channel
and why are you using isinstance
also is_nsfw either returns True or False
.is_nsfw == True => .is_nsfw:
oops gotta revers that
also you can simply pass embed.timestamp= . . . into the embed constructor as timestamp= . . .
Still outputs nothing
is there a message type returned by the message object that says it is a reply? in discord.js v12
what error gets thrown at you
Tried that with stopping a loop, loop would only stop when not running
No error at all. Not even a NSFWChannelRequired
does anyone know how to set library?
http requests
how
on_command_error anywhere?
what do you mean by set library
like Discord.js
or Discord.py
yes but what about it
Nope, Error handler is not picking up anything
explain what you're thinking of, we can't read your mind
^
can I see it
it may be eating up an error that's popping up
Anyone wanna play among us?
no
fuck off
@everyone who wanna play among us
@modern sable
@hasty mulch Show me your on_command_error
a) you cant ping everyone, just saying
b) #general or #general-int for questions like that one
tryna figure out why no error isnt popping up
Give me a minute, it’s more than 2,000 characters
holy shit what the fuck
I just wanna play sum among us man
#general or #general-int, ask there
😂
Last time, go to #general
don't ask here
@gilded olive You know what would help?
what's up
If I did is_nsfw() instead of is_nsfw
It’s basically a cog that was originally an example from the d.py server with some more errors added on as I came across them
i have a class client that has a property Gateway which is a socket.io-client socket. I want to extend the Socket class to have my custom events but im not sure how to do this (it doesnt throw an error but doesnt work either)
I see...
no
oh
wait ill send code
export interface Client {
gateway: {
on(EventName: Events): a type
}
}```
```sh
All declarations of 'gateway' must have identical modifiers.ts(2687)
Subsequent property declarations must have the same type. Property 'gateway' must be of type 'Socket', but here has type '{ on(EventName: Events): any; }'.ts(2717)```i know that this is basically self explanatory but i still want a solution; how can i add events with custom intellisense like this
Anyone know how to get my bot to:
Automatically detects users who use selfbot eg when it sends an embed its blacklist automatically, so if it streams its blacklist too, mention me if you know.
no
use method overloads
you can't identify a selfbot
only discord themselves can
FTNL do it
He blacklist a user if he send a embed
interface Something {
on(event: 'ready', listener: () => void): this;
on(event: 'message', listener: (message: Message) => void): this;
on(event: 'guildCreate', listener: (guild: Guild) => void): this;
}
@pure lion
users can send embeds without a selfbot
But generally when users send embeds it means that they have a selfbot
it doesn't
does this mean i'm a selfbot now?


i dont want the events to be directly on client, and this solution would do that
afaik, users cant send embeds of type rich
so you can check that
but also
Embed types are "loosely defined" and, for the most part, are not used by our clients for rendering. Embed attributes power what is rendered. Embed types should be considered deprecated and might be removed in a future API version.
they dont recommend using it
I will search on google, I already did it but hey
I need help pls
When i use the quick.db
And run node . in the console
The console logs this error:
Error: Could not locate the bindings file. Tried:
you didn't follow the installation guide
Oh, what guide?
oh thank you
how do i make it so it checks this, then ignores if it isnt
so
if(command.config.premiumOnly = "true") {
db.fetch(premium, user)
if(!premium) return msg.c.send("no work");
}
something like that
huh?
oh wait wrote the wrong thing
basically
make premiumOnly an optional thing in config
so if there's premiumOnly, do something about it. if not, just ignore
why are you storing it as a string
just use a boolean
and you can use nullable, i think that's in js
nevermind
it's a typescript thing
it's optional by default
everything is optional by default
Does anyone know what fuzzy matching implementation would be best if I want to fuzzy match longer phrases with short queries? Levenshtein (edit distance) doesn't seem to be too good for that
o
if i were to have something like a profile, let's say,
a user has item one but does not have item 2
in their profile:
User's Items:
Item one
a user has item one and has item 2 but does not have item 3
User's Items:
Item One
Item Two
rn i have it check for each thing
like this
if (devbadge === "true" && premiumuser === null) badges = "**__User Badges:__** \n\n Bot Developer"
if (premiumuser === "true" && devbadge === null) badges = "**__User Badges:__** \n\n Premium User"```
so maybe like if this condition is true, add something to the embed
does the db not allow booleans?
you can still use booleans
if so i'd say just use 1 and 0
or integers
i mean i have it saved as "true"
well regardless, how would u do what i said above
^
By items are you referring to badges?
well yes items and badges
you might want to look into bit flags
im still having problems with my bindings
i followed the guide and the console logs an error
you will save space with bit flags and it's a proper way to do something like badges
is python added to the path?
also windows build tools installed?
yes
what exact error did you get?
Error: Could not find the bindings file. Tried:
I have the bindings in the node modules
and the quick.db
may the bot doesnt have enough permissions in the server
Depends on what you're trying to do. Pretty sure you will always get that warning when trying to edit anything for the server owner. Otherwise, if you're trying to edit a user (nickname or role) while the bot ranks lower than them in roles, you'll also get that warning.
what?
What do you mean what?
Are you trying to edit roles or nicknames?
Are you trying to edit those for the server owner?
If you're trying to error handle it, then you probably need to check if the user is the server owner first because you can't manage them. I'm not completely sure about discord.py but for discord.js there's a property of the user called isManageable and you can check that instead
If you're trying to do other server-related things like managing channels, then I think there's another way to check if you have the permissions before you try to do it
You're missing the entire point of what he is saying @bitter badger
He is trying to handle BotMissingPermissions
Which raises from the decorator
@bot_has_guild_permissions() or @bot_has_permissions()
example if he passed the ban_members=True kwarg in and it was False
BotMissingPermissions would be raised
And you can handle them in an event called on_command_error
no
even if the bot has a permission like manage messages it doesn't work if the channel has overwrites
figured it our after way too long >_<
apparently I needed to use commands.bot_has_permissions decorator on my commands
if(currentqueue.players.length >= 2) {
let playerone = reaction.message.guild.members.cache.get(currentqueue.players[0])
let playertwo = reaction.message.guild.members.cache.get(currentqueue.players[1])
const queue = await Queue.findOneAndUpdate({id: reaction.message.guild.id}, { $pull: { players: [ playerone.id , playertwo.id ] } }, { multi: true })``` never pulls the users
anyone have any idea about yaml ? i wanna do // and my message such as js u do this // it doesn't mark it as a code , anyone knows how to do it with yaml
would it be my server my bot is hosted on making it respond slowish?
its possible @tender steppe, create a ping time using client.ws to check
where are you based?
Canada
more then likely
Under 200ms is perfectly fine for a bot.
Under 400ms is okay, most users won't notice.
500-1000ms is starting to get kinda bad.
alright
why is this error occuring?
});
}
if(message.content == "!product19")
//product 19
const product19 = new Discord.MessageEmbed()```
i am not even using typescript but javascript
Do you need brackets around that if
Shouldn't the ! Be the other side of the =?? Or am I misunderstood your function
it is my prefix.
hardcoded.
yeah i do.
any idea why this happens?
wdym "this happens"?
partial user comes from the reaction add event, but they are all the same user
so first of all a new user is created with no data, which shouldnt ever happen
then its created again with proper data
but the one that goes off with the event emit is the one with no data
does anyone know how to Make bot Reply if you mention him
bruh who changed my name
i just noticed my bot was down. so i logged on heroku and deployed, everyting works no errors i have my worker: node index.js but my bot doesnt go online
I need help pls
When i use the quick.db
And run node . in the console
The console logs this error:
Error: Could not locate the bindings file. Tried:
I followed the instalation guide two times and re installed everything again
is your file in your bot files ?@kindred niche
what file
pls help
the bindings file.
the bindings file is into the node modules
listen for the message event
check if the message mentions the bot
ez
guys??
Ummm any error?
nope
Are you using a host right
check the logs
ok
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 12.x...
Downloading and installing node 12.20.0...
Using default npm version: 6.14.8
-----> Restoring cache
- node_modules
-----> Installing dependencies
Installing node modules
@discordjs/opus@0.3.3 install /tmp/build_2b36b7cd_/node_modules/@discordjs/opus
node-pre-gyp install --fallback-to-build
[@discordjs/opus] Success: "/tmp/build_2b36b7cd_/node_modules/@discordjs/opus/prebuild/node-v72-napi-v3-linux-x64-glibc-2.27/opus.node" is installed via remote
added 145 packages in 3.472s
-----> Build
-----> Caching build
- node_modules
-----> Pruning devDependencies
audited 145 packages in 1.199s
9 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build succeeded!
-----> Discovering process types
Procfile declares types -> worker
Default types for buildpack -> web
-----> Compressing...
Done: 26.7M
-----> Launching...
Released v22
https://yarobot.herokuapp.com/ deployed to Heroku
didn't tell you to paste your entire logs but ok
and i meant the actual logs
not the build logs
Just because a build succeeded doesn't mean your bot would totally work logically. We don't need build logs. Console output is very important
where do i find my logs?
More -> View logs
2020-12-25T22:00:32.497311+00:00 heroku[worker.1]: Starting process with command `node index.js` 2020-12-25T22:00:33.118648+00:00 heroku[worker.1]: State changed from starting to up 2020-12-25T22:00:33.123172+00:00 heroku[worker.1]: Idling 2020-12-25T22:00:33.128171+00:00 heroku[worker.1]: State changed from up to down 2020-12-25T22:00:33.133245+00:00 heroku[worker.1]: Idling because quota is exhausted 2020-12-25T22:00:40.684136+00:00 app[worker.1]: Error waiting for network: Resource temporarily unavailable 2020-12-25T22:05:44.116611+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=yarobot.herokuapp.com request_id=0cb92dd0-ed9a-413f-82e7-4369a85bac14 fwd="80.60.49.118" dyno= connect= service= status=503 bytes= protocol=https 2020-12-25T22:05:44.499934+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=yarobot.herokuapp.com request_id=2992433d-bc24-46e8-aa39-6ec031b211a6 fwd="80.60.49.118" dyno= connect= service= status=503 bytes= protocol=https 2020-12-25T22:05:54.883369+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=yarobot.herokuapp.com request_id=0ed1965e-5768-42d2-b0b2-cab0f6f1a5c8 fwd="35.237.4.214" dyno= connect= service= status=503 bytes= protocol=https 2020-12-25T22:05:55.164792+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=yarobot.herokuapp.com request_id=e4f85c73-04ee-459c-9979-f2e26ba3fc2b fwd="35.237.4.214" dyno= connect= service= status=503 bytes= protocol=https
o

what do i do now?
wait 5 days
or verify your account with a credit card to get 450 more dynos
but when do i lose dyno's?
i use something.host
so it cant run for a full month?
o maybe i have 2 apps for 1 bot
Woah woah it's hours not dynos
i had some issues so i made anotherone
Dynos are like the servers
o
heroku isn't the best option for bot hosting anyways tho
i never used database i want try it
is there another free option?
does there any host for bot hosting?
i recently switched to google cloud compute engine
yeah but free
a better one
its not completely free depending on the location
but im pretty sure theres a free tier
tell me more about it
basically you get your own virtual machine
wow
you can access its shell and do stuff there
I need help pls
When i use the quick.db
And run node . in the console
The console logs this error:
Error: Could not locate the bindings file. Tried:
idk
breh
search google cloud platform or something
help
Read the pin messages
"3. Get your data/token stolen
a. This issue is practically removed when getting from a trusted source (e.g. AWS / Google Cloud (the free (trials) are relatively bad for hosting bots))"
What's your point
i am gonna use heroku then heheheh
The pinned message
Who wrote it?
A bot developer
how do i delete my app on heroku?
app settings
Being a moderator doesn't mean you're on the team
ok thx
Also that doesn't mean they agree with every single part of it
We dont know who pinned it
ok then can someone tell me Basics Code of Quick.db
i have tryed 3 days to do quick.db
i always have errors with bindings
im trying to get help
Oh so google cloud isn't good, but quick.db is?
Me too, im trying but i have alot of errors in console
quick.db is just an sql ORM of sorts. SQLite is the actual database, which is very good for structured data storage. quick.db more closely resembles a JS Map than sqlite which makes it decent for beginners.
So, how can i get another data base?
search for it
quick.db isn't a database
But can save values
Well Quick.db is what
for example, you can use mysql, mongodb, postgresql, etc
It just simplifies working with SQLite
mongoose isn't a database
bruh
t
Ask them to look into databases and find one that fits instead of just saying "install MongoDB"
Depends on what you're comfortable with. I'd recommend using sqlite, mysql or some other sql database like MariaDB (I would personally recommend over MySQL) but "non file based" databases require additional setup which may be a turn off
i made a new acc but now it doesnt register my procfile
refresh the page
i did
sometimes that works
What is your procfile
worker
is mongodb a good database?
oh nice, ill try it!
so i wanna check if a user has a role and if yes then add another role
i have some code but i dont know in what order to put it in
else if (command === "check roles"){
let role2 = message.member.guild.roles.cache.find(role => role.name === "-------------------colors--------------------");
let role = message.member.guild.roles.cache.find(role => role.name === "Red");
if (role) message.guild.members.cache.get(message.author.id).roles.add(role2);
if (message.member.roles.has(role) {```
godzilla had a stroke reading this and died
hehe
ok so
is there a way that i run a command then it checks for every member in my server if they have a role (in my case ''red'') then give all the people who have that role another role
not sending error
function catchErr (error, message) {
client.users.get("390690088348024843").send () ("There was an error at channel" + message.channel + "in guild" + message.guild);
client.users.get("390690088348024843").send ("ERROR" + error)
}
if (Error) {
console.error(Error, message);
message.author.send(Error)
}```
client.users doesn't have a get() method
you're probably looking for client.users.cache.get('user-id') or client.users.fetch('user-id')
and Error is a global class, the condition will always be true
and why is it sended to other of they didn not use a command
wdym?
on my alt
i get dm
when a do the command and my main get dm too
maybe you got an outdated version?
did you copy the code exactly here
yes
there are some bad placed parenthesis somewhere over there
this right
const guild = client.guilds.cache.get("id");
?
tias
Anyone attempted discord bot development in Julia?
Just curious if it's something worth getting into
function catchErr (error, message) {
client.users.fetch("390690088348024843").send("ERROR" + error) ("There was an error at channel" + message.channel + "in guild" + message.guild);
client.users.get("390690088348024843").send ("ERROR" + error)
catchErr (error)
console.error(error, message);
message.author.send(error)
}
why is my bot going offline
Is that the code that causes it to go offline?
not really
but that code stop the bot from going offline but is not working
btw it a error handler
@dusky sundial
await is undefind
also, isnt that function an infinite loop?
async function catchErr (error, message) {
await client.users.fetch("390690088348024843").send("ERROR" + error) ("There was an error at channel" + message.channel + "in guild" + message.guild);
await client.users.get("390690088348024843").send ("ERROR" + error)
console.error(error, message);
message.author.send(error)
}
that still wont work
?
ur right sõ
Also, are you sure you want the bot to send the error message to whoever wrote the command that caused the error?
I'm pretty sure you need a way for users to disable that feature, if you want the bot to be approved by top.gg but I might be wrong.
it is approved
and im add a disable command
Cool, just making sure. Can't help too much with the code, I'm not that good at js
but I think that message.author.send needs to be awaited aswell
hey so how would I set this up
never used a vps before so ya

how would I setup sqlite with it rather
@lament rock await it
sqlite is super easy to setup, you dont need to do anything, just install it from npm
or using whatever package manager
It's not my error lol. I was pointing out errors of #development message
Errors wont tell you the resolve type
await what
The promise
message.author.send?
the fetch
if you do await a.b.c.d you are basically doing await d
but you have a promise in the middle
so you need to await it separately
you can await multiple functions, if you await a, b, c. then b will only execute once A is finished, and C will only execute once B is finished. so thats not true what you said
for example, imagine that c from a.b.c.d is a promise
async function catchErr (error, message) {
await client.users.fetch("390690088348024843").send("ERROR" + error) ("There was an error at channel" + message.channel + "in guild" + message.guild);
await client.users.get("390690088348024843").send ("ERROR" + error)
console.error(error, message);
await message.author.send(error)
}
😕
you need to either js result = await a.b.c; result.d; or ```js
(await a.b.c).d
ok
you can await chained promises, thats a different thing
You could copy the sqlite to your pc then open with some database manage software
Editing it via terminal is kinda messy
ik I have browser for it but
I’ll maybe just switch to mongo
mongo seems x10 faster
sqlite has a built in browser not so? I use it sometimes
you sure that'll work
sounds prone to corruption
How would it corrupt? Just do a hash check before and after
Never had issues with scp
what i need to fix now
async function catchErr (error, message) {
await client.users.fetch("id").send("ERROR" + error) ("There was an error at channel" + message.channel + "in guild" + message.guild);
await client.users.get("id").send ("ERROR" + error)
console.error(error, message);
await message.author.send(error)
}
you just broke it even more lol
nice
Is there a way to increase the rate at which your bot can react to messages with multiple reactions?
You can use await functions or .then functions.
Not at all
When I ran the help command for some bots, they react with a series of reactions with a delay between each less then half a second.
I mean, you could probably fine tune the time between requests and sacrifice overall reactions/min
Some libs add a delay between each request
Discord has it's own rate limit buckets per route and also global. To avoid tokens being reset, you should never attempt to circumvent rate limit buckets
I think I found out how to react them faster.
msg.react('🛡')
setTimeout(() => msg.react('🐱'), 400)
setTimeout(() => msg.react('⚔'), 800)
setTimeout(() => {msg.react('💙')}, 1200)
Using setTimeout(), and by increasing the delay by the same amount, giving me faster reaction times.
You run the possibility that reactions will appear out of order by race conditions that way
You can just decrease the restTimeOffset under ClientOptions
I put 200
o
It should be fine unless you have a bad connection
well, guess setting it to 300 should be fine
same
Nice! Now my bot reacts faster. Thanks
do u think this is enough ram
depends on what your bot does
so what would the above be suitable for
my bot does economy (takes db values changes them etc) and some logs
You'll wanna run some local tests to see just how much you are actually consuming in testing then perhaps do some testing under the live token to populate caches (if you have any). If your bot doesn't have any user search functionality, you can cut down on a LOT of memory and cpu usage by disabling some intents you really do not need and also potentially switching to modular libraries so that you can control your cache
whats wrong
const db = require('quick.db');
const rs = require('randomstring');
module.exports = {
name: "setup",
description: "info",
async run (client, message, args){
let permcheck = new Discord.MessageEmbed()
.setColor('#e64b0e')
.setDescription(`You Don't Have Permission To Do This`)
if(!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send(permcheck)
let setupcheck2 = new Discord.MessageEmbed()
.setColor('#e64b0e')
.setDescription(`This Server Has Already Been Setup`)
message.guild.roles.create({
name: 'Support Team',
color: 'BLUE',
permissions: ['MANAGE_MESSAGES', 'KICK_MEMBERS']
})
.then(role => console.log(`Created new role with name ${role.name} and color ${role.color}`))
.catch(console.error)
let categorycreate = new Discord.MessageEmbed()
.setColor('#e64b0e')
.setTitle(`Server Setup Successfully`)
.setDescription(`Support Team Role: **Support Team** | Open Ticket Category: **Tickets** | Closed Ticket Category: **Closed Tickets**`)
var name = `Tickets`;
message.guild.channels.create(name, { type: "category" })
var name = `Closed Tickets`;
message.guild.channels.create(name, { type: "category" }).then(
(chan2) => {
chan2.overwritePermissions(message.guild.roles.cache.find('name', '@everyone'), {
'SEND_MESSAGES': false
}
)})
var name = `ticket-logs`;
message.guild.channels.create(name, { type: "text" }).then(
(chan) => {
chan.overwritePermissions(message.guild.roles.cache.find('name', '@everyone'), {
'VIEW_CHANNEL': false
})
chan.overwritePermissions(message.guild.roles.cache.find('name', 'Support Team'), {
'VIEW_CHANNEL': true
})
let category = message.guild.channels.find(c => c.name == "Tickets" && c.type == "category");
chan.setParent(category.id)
chan.setTopic('Ticket Logs Channel For Support Tickets Bot')
})
}
}```
Show line 42
sad src folder noises
pass a function instead
lemme see
which must return true for the value you want to find
module.exports = {
name: "rolesetup",
description: "info",
async run (client, message, args){
message.guild.roles.create({
name: 'Support Team',
color: 'BLUE',
permissions: ['MANAGE_MESSAGES', 'KICK_MEMBERS']
})
.then(role => console.log(`Created new role with name ${role.name} and color ${role.color}`))
.catch(console.error)```
}}
it doesnt show an error
but doesnt make the role as well
wdym
I thought you were giving a role.
So, in that case it must've been an hierarchy error i.e., the bot role is at a position below the role which is to be given.
it has the highest role lol
Oof
https://million.is-a.computer/files/Chfm28vTaT2UjUxe.png what is everyone supposed to be?
const everyone = message.guild.roles.cache.find(r => r.name === '@earnest phoenixryone');
@crimson vapor
yeah but if it is coming back undefined that could cause the error
so how fix it
You can just put the guild id if you don't need the role
Hi I want to keep meme in different section what name should i keep for that section? any suggestions
It doesn't comes under development?
Are you talking about bots, or about your server?
use chan2.edit({permissions: {}})
owerwritePermissions is from djs 11
aaaah thanks a lot
also find takes a function

I would like to know how to check if server ID is valid or not?
catch it
if it's not null or undefined or error it's valid
got it
message.guild.roles.everyone
Whats the main differences between discord.js and discord.js-light? What would you have to change when switching? And last question, is there any sort of guides/docs for discord.js-light? Ping me with any responses, please.
I want to hide a addfield in embed if the user is bot else display that addfiled.
How to do? Any idea?
const embed = new MessageEmbed();
embed.addField();
if (!user.bot) embed.addField();
embed.addField();
send(embed);```
It decreases memory usage, all you need to do is replace discord.js with discord.js-light and it should still work
I suggest actually reading the readme
Alright, thank you
I'm doing a discord dashboard, But when i tried to use button "authorize" in the redirect page, the console logged this: (sorry for my english)
TokenError: Invalid "redirect_uri" in request.
pls
uhm
i have a working bot with dashboard
u need to supply more info but in general its probably a mismatch between the configured redirect urlk
between the configured redirect urll and the url u actually redirected to
this is my strategy
i have a working bot with django backend dashboard that calls db via django orm, if anyone is interested lemme know (took me some time to find out the best practices)
no
yep
Cause you are using django
its nice too cause django comes with built in admin panel
I have no experience with python, tbh. I tried a dashboard with express but failed miserably
eeehm.... help me pls
smh
it seems you arent followin the docs properly, i used a 3rd party lib in my project to handle what u are trying to accomplish so i cant really help u
in every lang its kinda tricky
because you have sync to async issues
Exactly what I don't like, bugs
Make sure its actually redirecting to that then
@clear marlin like this
TokenError: Invalid "redirect_uri" in request.
at Strategy.OAuth2Strategy.parseErrorResponse (C:\Users\federica\Desktop\Dashboard\Dashboard\node_modules\passport-oauth2\lib\strategy.js:358:12)
at Strategy.OAuth2Strategy._createOAuthError (C:\Users\federica\Desktop\Dashboard\Dashboard\node_modules\passport-oauth2\lib\strategy.js:405:16)
at C:\Users\federica\Desktop\Dashboard\Dashboard\node_modules\passport-oauth2\lib\strategy.js:175:45
at C:\Users\federica\Desktop\Dashboard\Dashboard\node_modules\oauth\lib\oauth2.js:191:18
at passBackControl (C:\Users\federica\Desktop\Dashboard\Dashboard\node_modules\oauth\lib\oauth2.js:132:9)
at IncomingMessage.<anonymous> (C:\Users\federica\Desktop\Dashboard\Dashboard\node_modules\oauth\lib\oauth2.js:157:7)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1224:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
noice
i fix it
gj m8 glad 2 hear
Thanks.
Yeah
Do you guys know a good platform I can use to deploy quick test instances of nodejs?
and ability to edit files
preferably free
just need to run it 10-15 mins at a time
Wont be used for prod
visual studio code? lol
it has a run npm script feature via gui and a command line with an editor + proprietary ssh support so yeah

@split hazel I need it to be accessible by internet
dont wanna portforward on my network
It's really best you install the plugin onto your visual studio code, it will then launch a separate version with all your plugins and themes launched from the server but if you really insist it being available over http (with a password) https://github.com/cdr/code-server
AH, glitch
I was looking for glitch
have you guys tried the slash feature?
glitch isn't great because it has no intellisense but I'm guessing that's fine
no api support it
Dont need intellisense
i've made my own api for now
i created one without responses
and it's so good
what does it do then?
just a test https://i.imgur.com/Uutz5ld.png
yeah it's basic but it's better than before
a step in the right direction
tbh i'm probably too hype for that
I'll still add it to my mod bot rewrite but I'll only consider using it if they add something like silent commands
silent?
yes no trigger message or response
discordjs is quickly updated but not discord.net or dsharpplus
discord.js doesn't support yet
yes
discord js has tons of contributers looming over the repo waiting for discord to release a new feature
at least someone did something on it
^
this is created with <Client>.api
(private property of client)
discord.net and dsharpplus don't have the reply feature yet :/
hey how to make bot react to message that is sended after the command message by someone else in python
Guys how to rename channel after lockdown
And remove when unlocked.
Any help is appreciated.
how to show a user's game?
i mean game
and custom status why not :)
i tried doing member.user.presence.game
it didn't work :c
what library are you using? @tribal siren
do you have the presence intent enabled?
@zinc fable ?
@weak parrot ?
banned
Nice
js
and ye saying for 19480184 time i have it enabled
discord.js ?
xyes
did you enabled it in your lib?
try to get member.user.presence.activity
then you eval the member.user.presence.activity what do you get?
and message.author.presence ?
hey how to make bot react to message that is sended after the command message by someone else in python
message.add_reaction
there is such a thing called documentation
read it, it's cool 
what is that
Guys how to show moderation bot in all channels? including private?
ping
my trial bot has all perms except administrator
Wdym
my demo bot is not showing in channel which has permission for few.
better to say private
i gettings 403 forbidden error, i hosting glitch for my website
i how to fix pls help
what service you're using?
didn't knew it, i was thinking he said he had a glitch tbh

hmm my nitro still exists
idk why


wtf HTTPError [FetchError]: request to https://discord.com/api/v7/gateway/bot failed, reason: getaddrinfo EAI_AGAIN discord.com at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:93:15) at processTicksAndRejections (internal/process/task_queues.js:93:5) { name: 'FetchError', code: 500, method: 'get', path: '/gateway/bot' }
wtf does this error mean ?
pretty sure v7 isnt a thing
omg my discord.js broken
probably just update it
[text](link)
why do i put myself through this
did you made this manually?
it's moon chan ofc he did
hi
well i would rather make it dynamic
how to get the nickname of a user?
message.author.nickname doesn't seem to be corret
per server or global?
per server
that's just too much hardwork
@tribal siren it's a User object
user.username
you need to get the GuildMember object of the message to get the nickname
(nicknames don't exist outside guilds)
ye
message.member.nickname or smth i dont remember
how can i make filter so i maded like command with reactions and whenver someone press it works? here is part of the code ```const filter = (reaction, user) => user.id !== message.client.user.id;
var collector = playingMessage.createReactionCollector(filter, {
time: 8.64e+7
});
collector.on("collect", (reaction, user) => {
const member = message.guild.member(user);
switch (reaction.emoji.name) {
case "🔇":
reaction.users.remove(user).catch(console.error);
// code
break;
case '🔈':
reaction.users.remove(user).catch(console.error);
// code
break;
case '❌':
reaction.users.remove(user).catch(console.error);
// code
break;
}
i want to make it only who send message command works
do u get me 😄
not for everyone
imagine making a bot that replies with h when you say h and getting a whole bot developer role
@tribal siren yeah it's message.member.nicknane
erm...
ok thanks
help :{
you do it in bot.on('messageReactionAdd', async => {})
no
var playingMessage = await message.channel.send(embed);
await playingMessage.react("🔇");
await playingMessage.react("🔈");
await playingMessage.react("❌");
} catch (err) {
console.log(err)
}
const filter = (reaction, user) => user.id !== message.client.user.id;
var collector = playingMessage.createReactionCollector(filter, {
time: 8.64e+7
});
collector.on("collect", (reaction, user) => {
const member = message.guild.member(user);
switch (reaction.emoji.name) {
case "🔇":
reaction.users.remove(user).catch(console.error);
// some random text here
break;
case '🔈':
reaction.users.remove(user).catch(console.error);
// some random text here
break;
case '❌':
reaction.users.remove(user).catch(console.error);
// some random text here
break;
}
})
}
}```
@tribal siren
i can share u entire cmd
in dms
that's not how it works
and i think it's not break, it's return
if it is working then why do you ask for help

when bot sends message and u someone random react to it
its working
i want to make
only who send message to work
do you understand me
?
That's a reaction collector for a specific message and the method you told them takes multiple messages
i just want to make filter
only the one who sends the messages code will work
any ideas how to do that D:
Hi
totally not
does anyone knows about yaml?
in js // this is for ignore the code how to do it on yaml?
idk
is there a limit on .cache
how to do it properly then?
message.channel ig
can u get all the guild members with .fetch?
cause cache returns
invalid many times
i think there's a limit or smth
if you want to cache all members just set fetchAllMembers to true in ClientOptions if you have the guild members intent
oooo ok thanks a ton
and once i do that
i can use
message.guild.members.cache.forall
right?
?
once i enable the fetchallMembers then i can do message.guild.members.cahce.forEach
sorry put forall on accident
yes
what is it
how do you scale your discord bot for 100k users? like i cant put it behind a load balancer can i?
100k users?
yeah
thats like nothing
i want to make this to only who send message emojis should work, so if someone react to this message when bots sends it will work so i want to make it to not do that i want it only for message sender ```try {
var playingMessage = await message.channel.send(embed);
await playingMessage.react("🔇");
await playingMessage.react("🔈");
await playingMessage.react("❌");
} catch (err) {
console.log(err)
}
const filter = (reaction, user) => user.id !== message.client.user.id;
var collector = playingMessage.createReactionCollector(filter, {
time: 8.64e+7
});
collector.on("collect", (reaction, user) => {
const member = message.guild.member(user);
switch (reaction.emoji.name) {
case "🔇":
reaction.users.remove(user).catch(console.error);
// some random text here
break;
case '🔈':
reaction.users.remove(user).catch(console.error);
// some random text here
break;
case '❌':
reaction.users.remove(user).catch(console.error);
// some random text here
break;
}
})
}
}```
i have a basic VM tho 3.75GB RAM 1 CPU on GCP
i've got mongo, a lavalink node, another bot and a few other things
woah okay lets see if my bot lags
should be good
i got lavalink too btw forgot to mention it
but even tho if i wanted it to scale
i cant spawn multiple instances because i can only have 1 bot instance
shards?
???
in your filter add user.id === message.author.id
Okay
i start to hate frontend work even more. started to get into react but then you realize that you also probably want to know how to properly use oauth2 for discord login, when you got this set in the backend you still have to figure out how to deal with the stuff like seasons frontend (to protect certain routes to get accesses without an active season) and a lot of other stuff.
additional i suck at frontend
ty
i recommend nextjs, it goes well with express and react, plus it gives you that dynamic filename routing which you can easily restrict by cookies and your own auth logic.with discords login
You shouldn't worry about user count
You'll most likely never ever have all 100k users cached
The issue is servers actually
i see
if you use js and are still worried i can recomend d.js-light, with this you can disable caching of users for the most part
I use sqlite for profile caching, it makes tens of thousands of transactions per second and didn't feel a thing
Databases are monsters when it comes to io
yeah SQL is way more faster than NoSQL i had to redesign everything because i migrated from mongoDB ;-; the computations were so slow
15x faster i'd say
Depends actually
bot dashboard?
The thing is that sql is made for server-side computations and complex relationships
any idea how it works
use MERN stack as example for a Dashboard @stuck pike
well maybe its because i was using free version of mongoDB where ihad like 100k documents but the size it showed me was like 100kb bruh but it still took like 2mins to execute a query where as postgres took 2secs max also i was dealing with relations a lot so using mongo was a bad idea for me
toutorial vid?
the free DB got almost no Ram and a shared CPU, MongoDB caches all the keys in ram and the low powered machine could be I/O limited
there are a few thousand on YT, idk if i can find one that works for you
you tryna build a dashboard for your bot?
but you have at least went in the weeb side
xD
For me I used react + websockets
i started making a dashboard a few days ago, and i hate frontent its so annoying to be forced to make something look good
Yeah
ahem CSS
ik a bit off css and ract.js
That's one issue I faced
o
I'm horrible at designing stuff that look cool
Cascading Stupid Shit
the worst issue i faced was designing cross platform compatible frontend 😂
bruh like it looks good on android but if i open safari
all jacked up
Eh, I won't mind
chrome is home
safari is shit anyway
yea
You just have to support chromium based and firefox
yeah
agreed
firefox is now chromium based
but the suffering tho
oh fuck
safari legit didnt support grids
lemme waste my time in dashboard uff
css grids
how to make a bot respond to me only.... on python
Check for your id
i dont want it to respond to others
idk py
Are you making an owner command with the command framework
Compare ctx.author.id to your ID I guess
in js we pass our id
ok ty...
Dot dot dot
lawl
it didnt work..... fml..... can someone pls dumb it down for me again?
@client.command()
async def de(ctx,*,args):
await ctx.send(args)
i want this
to
work for me only
There’s a check decorator provided by the library to restrict a command to yourself only
oh
yea specifically use is_owner decorator checks
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.is_owner
im not the owner in this case
but ill be back after i read what youve sent me
brb
but you code the bot?
no
i figured i could just pass my id instead
async def is_owner(ctx):
return ctx.author.id == 316026178463072268
@client.command()
@client.check(is_owner)
async def de(ctx,*,args):
await ctx.send(args)
Wait
how are you not the owner of the bot?
What are u doing exactly? Self-destruct button?
this is for a friends bot.... there are certain commands we want to use for ourselves
rp 🥲
Weird use-case but ok


