#development
1 messages · Page 1610 of 1
however with annotations you don't even need to import the classes
so it's more efficient?
but you save space
and all you need to do to add a new command is simply add the annotation on its class file
no declaration anywhere else
kekw
my pagination lib already took a hell of time to javadoc properly and get published on central
quick, someone knows how use quickdb with discord js commando?
what
just use it like normal?
save them as a string on a setprefix command
then check them before sending it to commando
Got a dev question here if anyone could help out. Context: I'm making a tic tac toe command for my discord bot that uses reactions as controls, and I'm having trouble with the on_reaction_add function. This command is pretty huge, so I won't send the entire thing here. My question is, could async def on_reaction_add(self, reaction): be located under a @commands.command() decorator, or must it be under a listener? I just cannot seem to get it to trigger when a reaction is added, and this obviously is a problem. Any help is appreciated! (discord.py rewrite, forgot to mention)
i mean...
huh
do you have the discord js server?
Long time no see, DBL
nvm founf it
(discord.js) anyone know the difference between these two?js Guild.approximateMemberCount Guild.memberCount
might be something to do with not needing the server members intent to use Guild.approximateMemberCount
but i'm not sure
approximate member count is sent over REST (when you set with_counts to true in the request)
member count over the gateway in the GUILD_CREATE event
this wil not working
your issue is installing right?
lol
you keep asking for help then going away and its impossible to help if you keep leaving
i have insyalling µ
people really need to stop using their onedrive folder for coding projects
like people come on git was built for this
i need this
pls hep
so the problem is installing?
i have installing all but if i do javascript node ticket.js its dont work
okay, did you follow this?
https://enmap.evie.dev/install#pre-requisites
github wish edition
I found this great article
https://dev.to/codemouse92/please-reinvent-the-wheel-4fm2
Why This Error?
It Has Just Begun to Appear.
one of your field values is empty, read the error
Lets see the Code, i mean you try to send a field with no value
I'm Reading Is Not Empty.
It has to be empty, otherwise u wont get this exception 
it clearly is
And if you want to get help, u could post the code snippet, where u try to build the embed
I tried
Man i try to help u, but just saying "why am i getting this error" with zero code and nothing is 0% helpful
let modlogs = db.get(`modlogkanal.${guild.id}`)
const modlogkanal = guild.channels.cache.find(kanal => kanal.id === modlogs);
if(!modlogs) return;
if(modlogs) {
let embed = new Discord.MessageEmbed()
.setColor(`${renk}`)
.setAuthor("Bir kişinin yasağı kaldırıldı")
.setThumbnail(user.avatarURL()||user.defaultAvatarURL)
.addField(`Yasağı kaldırılan kişi`, `\`\`\` ${user.tag} \`\`\` `)
.setFooter(`${botadi} | Mod-Log Sistemi`)
.setTimestamp()
modlogkanal.send(embed)
}
});```
For example this code fail
user.tag has to be undefined and causes this error
i don't think that's where the error comes from
the field value would still have backticks even if somehow user.tag was empty
also you forgot the () at user.displayAvatarURL
wait, you have default
is that even a thing
yeah it automatically handles the cause, when a user dont have a pic iirc
you probably want to use user.displayAvatarURL()
^
it'll fallback to the default avatar url
It's Not Just This Embedded Post, This Error
you dont need both user.avatarURL() || user.defaultAvatarURL in the .setImage(), user.displayAvatarURL() will work fine on its own
But i mean the error clearly says, that the field value is empty
or the avatar thingy is causing it
the error probably comes from another piece of code they aren't showing
user.tag is fine as the guildBanRemove event uses it and defines user
All of my Embed commands started to fail. I Think Have a Module Error
hm oke 
.setColor(`${color}`)
.setAuthor(`${client.user.username} Test`)
.setTimestamp()
.setDescription(`
> \`${prefix}test\` -> 123456.**
`)
.setTimestamp()
message.channel.send(embed)
};```See Any Error Here?
do you have the error message?
Title is missing?
it would help a ton
or can be the title empty
title is optional
title dont matter
oh i see
is line 23 in the guildbanremove eventembed?
you have .setTimestamp() twice as well
what have you defined color as in .setColor ?
const color = config.red not undefined
I'm trying now
continues.
But There Is Something Like This Stops Making Errors While Cleaning the DataBase
did u showed us line 23, where the error occurs?
whats the error?
yes
you sure its that embed?
why youre saying if (!modlogs) return but immediately afterwards another if case?
if(!modlogs) return means if it doesnt exist it stops the code
but he has if (!modlogs) and if (modlogs)
figure out what if(modlogs) means after I told you what if(!modlogs) does
everything in this embed seems fine, you sure its this one?
Just This Command Is Not An Error All Embedded Commands Error
Yes I think the Module Error
I just want to point out, its an unnecessary condition, because when if (!modlogs) evaluates to false, everytime if (modlogs) evaluates to true
But one thing needs to be taken into account, comfortably command works
im trying this embed on my bot and everything returns fine, so its probably a different embed
you mentioned this here, what do you have in your config file
Embed Color
is it a hex code or what
"red": "PURPLE", This.
its one with fields
Sends It But Sends Error To Console
the error is with fields
so it cannot be that one
specifically the value of one of your fields is empty
again, read the error, it clearly says field values may not be empty
the error is with an embed with fields
can you send that code here again
Which ?
the one in the image
const embed = new Discord.MessageEmbed()
.setColor(`${color}`)
.setAuthor(`${client.user.username} Test`)
.setTimestamp()
.setDescription(`
> \`${prefix}mod-log #channel\` **
`)
.setFooter(`${message.author.username}`, message.author.displayAvatarURL({dynamic: true}))
message.channel.send(embed)
};```
dont put `` in setTimestamp
I Was Trying It Now
No Here I Was Trying Them Now
soon™️
REQUIRE "TopPHP.php";
$ID = 1234567890 # Bot ID
$API = new TopGG("API_TOKEN");
$API->GET->votes($ID);
var_dump($API->GET->result);```
Got half of the API methods down pat, I need to work on the docs though so that it's easy to understand what is going on and how to make it work. It should make any PHP webserver-based stuff with top.gg API very easy to use, or if you are working with DiscordPHP/RestCord.

credits for auctions when you get 100+ votes
//index.js
const dbClient = new pg.Client({
connectionString: process.env.DATABASE_URL,
ssl: {
rejectUnauthorized: false
}
});
dbClient.connect();
dbClient.query('SELECT table_schema,table_name FROM information_schema.tables;', (err, res) => {
if (err) throw err;
console.log(res.rows[0])
dbClient.end();
}); //this worked
module.exports.clientPool = dbClient
//lotterystats file
const indexFile = require("../../index.js")
let pool = indexFile.dbClient;
const userData = await pool.query(`SELECT * FROM lotterystats WHERE id = ${user}`)
//Error
2021-02-22T22:59:49.532892+00:00 app[WORKER.1]: (node:4) Warning: Accessing non-existent property 'dbClient' of module exports inside circular dependency
this is heroku, I am trying to use heroku postgres
dont require index
the main file should never be required in other files
if you do node index.js then index requires a.js, then a.js requires index.js, it will loop forever
@quartz kindle using node-fetch, whats the proper way to catch errors?
a try/catch block or .catch()?
depends whether you await or not
yeah im using await
then try catch should work
you can use await .catch if you want to return something else in case of error
await a.catch(b) // return b in case a fails
or if you want to log/ignore the error
Hey @quartz kindle is there a specific way I should be indexing specific properties on my cache tables? For instance, I have my users tables and the primary key is the id of the user
This is related to when you told me you had an sql cache and I was using redis for Discord Object storage
For my specific use cases, I will also be filtering by username and tag
yes, you can index those too then
Is there a specific way to in postgres? All I see in docs is that theres a PRIMARY KEY
not sure if username and tag is in separate columns, just the way it was worded you made it sound like it was in separate columns.
nah. It would just be dynamic for username and discriminator. But thank you for this link
ye its fine to store tags only
that way you can use equals to search for tags, and LIKE% to search for usernames
True. I was just thinking that. Would also probably be more effective to do that
yes
when using LIKE on indexed columns, only the left side of the first % will actually use the index
so username% will be a good use for indexes
so. SELECT * FROM users WHERE tag LIKE 'poggers%'; ?
yup
the "poggers" part will use the index to fast match all strings starting with "poggers"
but if you want to do something like finding all tags that include "gg", then an index wont help much
since LIKE '%gg%' will not be able to make use of the index
Oh. I didn't know that
not sure if anyone knows the answer to this but basically I am trying to have my bot create channels that are connected to a certain role (bot also creates that role). anyone got any guides for me to look at?
as in creating a private channel for a role that the bot creates?
yes
create the role, then create the channel, overwrite the permissions so everyone cant see it and the role can
your bots libraries docs will cover how to do each
btw i dont think this is what they want
these are combined indexes, when you want to use both at once in a single query
I thought thats what the question was from the one line i saw.
ah xd
thanks, that will work but there is something else that I am trying to do but very hard to explain. so when I get there I’ll ask here
i need help, for some reason schedule.scheduleJob(actrule, function(client){ func.randomActivity(client); }); will not pass through client and apparently is undefined, how can i fix this
oop nvm i think i got it
ur the dumbest fuck I've seen in a good while LOL
Homie said he was confused and your getting mad at a little trolling? if you could even call it that?
grow the fuck up
pece
One message removed from a suspended account.
@flat pelican guy rude here
What happened here?
go to user setting and go to your profile pic and press change avatar then choose a picture that u want then press open then it done
what
can anyone tell me why roleID is undefined?
what would the best pi be for a quality vps
you can't use roleID outside of the function where it's declared
but if I would to put the let roleID = message.guild.roles.cache.find(role => role.name === "In " + roomName + "'s Room"); outside of the setTimeout it would still be undefined
then the role might not exist or it might not be in the cache
but I did all the steps to make it exist, right?
not exactly
Question: why exactly do you have a setTimeout here
i'm pretty sure you didn't check if the role doesn't exist
because usually people who do this sort of setTimeout simply don't understand Promises and are doing thing really badly
had anyone hosted a monorepo project on vercel?
gtk
nope
i hosted a next.js test project a couple of weeks ago
with monorepo?
actually, what I want is to build the other packages I've created in ts. Before deploying the wep-app
oof can't help you with that
I don't know anything about htm and css
ik the have changed something in css
is there a way to make this thing run
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('https://imgur.com/PosNitE.png');
}
</style>
</head>
<body>
</body>
</html>
hi
i need help with react.jsx and uploading it into firebase. so if you use firebase and react please ping also pls dont say "look at docs" because i dont really uderstand it
you can add a <style> tag to the markdown description
what
actually this code works in preview page
but after the changes it will not work
what's your css?
no problem
Hey
I need help
function chatbotvoice(message){
const speech = new SpeechSynthesisUtterance();
fetch('https://api.pgamerx.com/ai/response?message=Hi+how+are+You')
.then(res => res.json())
.then(json => {
console.log(json)
var result = [];
for(var i in json)
result.push([i, json [i]]);
speech.text = result[0]
console.log(result)
})
window.speechSynthesis.speak(speech);
chatareamain.appendChild(showchatbotmsg(speech.text));
}
This is my code
These are logs
this means it's getting the uh response
but how can i display it
wait nvm
I fiexed it
I was dumbo
appendChild
@opal plank in the rich precense i need the discord application or in navegator can on?
you need an application, SDK requires it
ok
:c the app discord dont open
are you using SDK?
how?
wdym how
coding
its .dll files
coding
you dont open .dll files
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
ok
anyhow, back to werk
you can't install discord on windows 7?
i think the error is .dll. you can help me?
the discord installation process is so straightforward
message.channel.send("something") but to a specific channel
maybe try again
Get the channel from <Client>.channels
or from <Guild>.channels
You think I can be bothered to write all that in google translate? I'm guessing you're missing the KERNEL32.dll - https://www.drivereasy.com/knowledge/solved-how-to-fix-kernel32-dll-errors-in-windows/#:~:text=dll file is missing or,to invoke the Run box.
Hello
ty
Is there anyone who can help me???
maybe, maybe not
Is the video a file on your PC or is it a link
better i install a other pc :c
That was for the UFO guy
let feedbackChannel = message.guild.channels.cache.get(`channelID`)
feedbackChannel.send(args.slice(1).join(` `), { disableMentions: "all" });
That code works if it's in the same server...but from another server it says TypeError: Cannot read property 'send' of undefined. How do I add the guild id there
The channel doesn't exist in the other server
channel IDs are unique, there cannot be two channels with the same id
I want it to go to one channel in my support server regardless of where the command is ran
Since it is a feedback command so the channel id and the guild if is static
Then don't get the channel from message.guild.channels, because that only contains the channels in the other server
use client.channels
ah okay
Hey There
I need help
with nginx
server {
listen 81;
listen [::]:81;
server_name demo.pgamerx.com
root /var/www/demo/;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
This is in my /etc/nginx/sites-available and /etc/nginx/sites-enabled
It's name is tuotorial
I have a folder in /var/www/demo
but I get an erorr at https://demo.pgamerx.com
404 Not Found
nginx/1.18.0 (Ubuntu)
Are you using discord.js?
Can't help then sorry
Try setting the thumbnail URL to your link to the video
ok
can u edit a normal message into an embed
it shows for me just
<discord.embeds.Embed object at 0x000001ED275C1430>
yep
how?
djs or dpy
dpy
sry
read the docs
Guys lets make brainfuck
it will be complied into ts
and then into js
and then into bytecode
and then binary
js is only compiled to bytecode on runtime, so
how does one compile brainfuck to js
making a brainfuck interpreter is easy, but making a compiler to js would be near impossible
Could do for static programs, but long running programs, not so much
Turning 8 instructions to valid javascript code doe
Some people like to suffer
that is what I meant
just copy ts and change methods doe
?

I don't think I understand the meme you were trying to make, then. Unless it was a joke about "how many abstraction layers there are until native"
thisss pls
Have you checked google
Yes
Was it just for the issue itself or did you also search for how to do what you want to do
I used this tutorial
look at some other tutorials and see what's different and try to reverse engineer it, then I guess
I barely know of anyone who uses nginx
I could help with apache
I even tried this
did you got a index file in the folder?
if you have no index file it will return a 404
i was having
but the tutorial was old i guess
i use it to proxy to my API, so i can have a nice URL without port
same
it works with apache, if you use Cloudflare and get the 5$ subscription for the app to send traffic to certain ports
:O
also i use Nginx to cache steam downloads on my NAS
I've been waiting to ask this for a long time
Is there any was to call a function or trigger a event or maybe a webhook with the youtube-api When a Youtube channel uploads a new video ?
rn I'm using a function that will trigger every 10 minuites and check if there's any new video and put it in the database if any (I'm afraid Google will ban me)
is there one ?
It's kinda shit but
the alternative is polling through ytdl or something similar which is jank
tf is Atom ?
(the code editor ?)

k thanks
if i have to handle three errors in a command what can i write after elif ?
how do i use the join guild OAuth2
holy shit sqlite errors are so bad
ERROR 1064 (42000) at line 20: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 9 VERY HELPFUL
!?
if Expression:
Handle Error 1
elif Expression:
Handle Error 2
elif Expression:
Handle Error 3
else:
Execute Command
Like this or what?
You really shouldnt do that
Looka like mysql to me
<3
is there a ratelimit for the setTopic function on a channel? It seems to work every 3 minutes or so for me and then stop working for 3 more minutes
the function is ran every 32 seconds
2 changes per 10 minutes
Ah right
thats the rate limit on channel updates
How would I do color themes with SSR? I store the color theme in localStorage, but when the server is rendering the content there is no localStorage
Is it possible for nginx to serve static files from within a docker. I guess a docker volume would be more applicable but I'm unsure on how to set those up
nvm I handled it
yeah pretty simple
just mount the vol to the base dir
in a compose
services:
thing:
volumes:
- .:/code
``` will mount the current directory to the `/code` folder in your docker container
you dont realyyyyyy want nginx in docker though for the most part
not worth it
also puts alot of load on the docker network
Lol, ah ok. Interesting. Thank you for the info
running a webserver inside docker is not really a issue, there are websites that run in a K8 Cluster with a few loadbalancers and they work fine
i need help
me too
me to
Not Found
You clicked on a link that doesn't exist. This is probably not where you were trying to go.
yeah
I advise to learn JS before attempting to code a bot
I advise the same.
I condone the points stated above.
I agree with the twat, and the other 2 people above.
I advise the same.
I advise the same.
Does this look too much like MEE6?
thats look like a gangster card xD, no it does not
no it just looks horrid and ugly
same xD
?
why is that?
is it because of the gradient ?
too much outlining on everything
I don't know what im supposed to focus on first
give your elements visual priority
If I only had a smaller outline on the profile picture and status icon, do you think that would look better?
not sure, try it i guess? i cant visualize it
alright
Sorry for my English I’m French :
Who has an code in JavaScript with - to 2000 characters ?
you make second files, to have a good structure
French plz 😅
my bot.js file is just 30 lines xD
==> mon fichier bot.js est juste 30 lignes xD
my french is very bad xD. I did not like the language lol
Google Trad Plz : Enfaite je commence dans le JavaScript et j’essaie de le faire sur des applications et le JavaScript sur BotDesigner car mon pc à surchauffé 😅 donc je le voudrais bien merci d’avance
"mettre plusieurs fichiers avec des sous-structures pour avoir une meilleure vue d'ensemble. "
English: put several files with sub-structures to have a better overview.
Je suis parle francais. But I do not think that we can talk here french
utilise discord.js-light , discord.js-light utilise sur bot avec 800 serveurs, seulement 35 MB de RAM
D’accord merci beaucoup ☺️
Ok very thanks 😊

Bye
meister do be talking baguette
DiscordAPIError: Request entity too large
I don't know where this comes from
trying to send a file larger than 8mb
i think it is very good
Thank you :)
Btw how do you get the bot dev role?
you get it when your bot is approved
ok
export const Link = styled.a`
color: ${({ theme }) => {console.log(theme); return theme.linkColor; }};
&:hover {
color: ${({ theme }) => theme.textColor};
}
`;
<Link>SomeLink</Link>
For some reason the styles don't get applied
the theme arg is correct
hey!
I tried to make a hyperlink in html:
doesn't seem like it's working.
<span>Add AwsomeCord by clicking here:<a href="mylink">Click here</a></span>
It's working, but it looks like your css is wrong
yeah
It's hard to say how to fix it without looking at your css, it looks like you have overwritten the default behaviour of the anchor tag
how can i link the used library on botinfo from the luca bot?
i didnt found it on the website
should i send you the bit of the css?
sure, put it in a bin and send it here
The used library is deprecated. But I think you can still change it in the edit page under "Bot's Library" in the "Bot Info" tab
Also send any css code which modifies the anchor tag in some way
oh so im fine, if i just leave it?
Yep
kk thanks 
hi
How to I make my bot automatically change their nickname when they join a server?
you mean the bot's nickname?
yes
what lib are you using?
Something like this:
<Client>.on("guildCreate", guild => {
// Here you can get your bot's GuildMember object by doing guild.me
});
And use https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=setNickname on the GuildMember object to change the nickname
You should also check if your bot has the permission to change their own nickname before you do it, though
I see
or catch the any errors
thanks
so when ever i miss something inside my commands code it shows alot of stuff unrelated to it but then the error thats relevant at the bottom under all the un-relevant stuff
heres what i mean ```During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\client.py", line 333, in _run_event
await coro(*args, **kwargs)
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 943, in on_message
await self.process_commands(message)
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 940, in process_commands
await self.invoke(ctx)
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\core.py", line 851, in invoke
await self.prepare(ctx)
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\core.py", line 786, in prepare
await self._parse_arguments(ctx)
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\core.py", line 693, in _parse_arguments
raise discord.ClientException(fmt.format(self))
discord.errors.ClientException: Callback for slow command is missing "ctx" parameter.```
i understand im missing the ctx
ignore my mistake
that's normal for an error handling exception class
python also will always throw the most recent error at the bottom
becaues core.py is an involved process
ahh ok
I've just used the code in the correct syntax, but and its corrupting the hole index.
Show the code
yeah ive been getting annoyed because it can usually cover up the error that i need to fix said command @latent heron
Console: Unexpected token '<'
thanks for the info
<Client> is something like pseudo-code, you're not supposed to put it in there, you have to replace it with an instance of Client
yeah you cant really define Client with <> or itll think its something else most likely
I don't know how you called your instance of Client, so I replace it with <Client> to avoid confusion, which seems to make things even more confusing for people who don't really know js that well
ye 100%
It's not corrupted anymore, but it says:
Client is not defined at /home/runner/Groovy/index.js:28:1 at Script.runInContext (vm.js:130:18) at Object.<anonymous> (/run_dir/interp.js:209:20) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47
const Discord = require('discord.js');
const client = new Discord.Client();
client.on...
the same name you created Discord.Client()
you need to define 'Client'
ok
You have to replace <Client> with the instance of the Client class, for example:
const bot = new Discord.Client();
bot.on(...
Can anyone with styled-components experience tell me what I'm doing wrong here?
export const Link = styled.a`
color: ${({ theme }) => {console.log(theme); return theme.linkColor; }};
&:hover {
color: ${({ theme }) => theme.textColor};
}
`;
<Link>SomeLink</Link>
The styles don't get applied. theme is correct, the linkColor is also correct, but the anchor remains blue 😢
When I define those styles in the global styles element it works as a class it works fine
Inspect element tells me that the styles don't get applied at all, so they aren't overwritten or something
rate it?
where do I look at?
rate what
ah, the card
the ui
messy
xD
programmer UI but I kinda like it
the colors are bad tho
Also the whole site feels bootstrap-ey
maybe a little too colorful
i like colors xD
at least change it up a little instead of using default bootstrap css
thx xD
esp the header
that is ugly idk how to fix it no solution found :c
It's the default bootstrap one
the header do look nice tho
but dark header with light theme is plain shit
either go full flashbang or full darkness
I guess I've been using bootstrap too much
yeah id prefer a darker theme
i use it because of that
oh look another bot site identical to every single other bot site out there
oop
Literally identical
Evie you know styled-components right
I wonder what's the template
Sure
cause it is a templated
Can you tell me what's wrong with this?
https://getwaves.io made here the waves
hmmmm
export const Link = styled.a`
color: ${({ theme }) => `${theme.linkColor`};
&:hover {
color: ${({ theme }) => `${theme.textColor`};
}
`;
Tried it like this?
would you believe this?
if not, what's your browser say, does it actually show the stuff?
My IDE doesn't like that
yes because every script kiddie that uses this template also re-uses hundreds of shit commands that don't make any sense because they're a "multipurpose bot"
My browser shows the anchor with the default styling
ok but what does the element inspection tell you
"it doesn't look right" isn't useful when debugging a multi-staged webpack generated output from a front-end framework using external tooling ffs
that's a kinda unique redacting
which I'm sure are all repetitive, boring, and unoriginal
oh wait, functions
no no no what those bots are saying is they have 250+ commands
because they're crap
that are customcommands
why are we talking about this here exactly?

If you want to make a bot that's the same as every other boring, lame, unoriginal multipurpose bot out there, you really don't need our help
but my bot is unique you have djs support
discord.js i mean
and is the most popular discord library
yeah I know what you mean and so does everyone because it's the most popular discord library.
actually, if what you're advertising is true, you made a "DIY bot"
which is pretty unique IF that's what it is
No errors, also the styles aren't getting overwritten, it only shows the default anchor styling
a {
color: #0d6efd;
text-decoration: underline;
}
lel ,but hard to gain guilds if the other bots like mee6 tells they have custom command actually they have only variables
Also I should probably mention that I also have SSR
the only custom command bot ik is yagpdb
but I don't think that's relevant
What you seem to have made is a way for a bunch of people to spam the fucking top.gg queue with bots that are all near identical but somehow we have to approve because they all have at least one custom command. unless you're kind enough to give us one simple command that breaks the top.gg rules that we can deny all of them for, like a crap math command or a common emoji that's seizure inducing. please do that and make our job easier
I dunno man I'd have to see the entire thing in context reproduced on a codesandbox to be able to help, and honestly I haven't done React in several months because I've moved to Vue.js at this point with the new job. Have you tried asking on .gg/reactiflux ?
bruh custom commands are guild only
Will do, thanks anyways!
what?
it is like yagpdb You create commands for your guild
it's a bot with 1 command only
and how is this related to #development
no with 10 command and 250 functions
I dunno I've seen a lot of stuff from you Rake but I have zero clue what your question is right now
what are you asking help with?
interface opinion
For the website?
yes your iq ➿
Ok here's my opinion
don't fucking make a site that looks like 900000 other damn bot sites
what does "functions set trigger and actions" mean?
it's not bad to use boldness in your words, but you have to deliver a message behind what those words intend
yes
okay,
set trigger and action
trigger role add
action giverole[roleid]
i'd recommend finding a way to exemplify or show it
or at the least write it on the page
looks like this
no
something to remember is that a majority of discord users are programming illiterate, they don't know shit what what you said means
oh my
don't mix light theme with rainbow theme with dark header
yes i am not done :c
looks fine imo
let people stylize things the way they want ie. themes like googlefeud suggested, just make sure your website platform is intuitive
websites can be amazing at what they do under the hood but if im lost on the website or what it does
it's no longer effective
Mee6
Can I use #development as a critique channel here? If so I would like to show something of my own and ask for criticism on it so I can improve it
So, I think if it hasn't been noticeable enough already, I guess I'll say it here that I really, and I mean really suck at English grammar
same
VSCode is an editor not a language
And I am 99% sure that my website is bound with a shit ton of grammatical errors
you still need to use a programming language to write the bot
I was wondering if anyone would be able to help suggest better wording.. 😂
I can kinda proof read it if you want, English not perfect but hey
this guy is 11 btw
Uh oh
@scenic kelp


au revoir
lel
Well that's one less noob we have to worry about I guess.
btw thx for reviewing
that works honestly, proofreading is better than nothing haha
Parm will use the [ K I L L E R Q U E E N ] stand
this is not advertisement i swear https://transword.xyz
how would i integrate the show servers and user count on top.gg to html?
There is no introduction to html and top.gg api's.
pain
Thanks parm!
What do you even mean by "html and api"
what is it you want to do
it's super effective
I am trying to show the server count an top.gg bot statistics on my html site
"Underage dude" fainted, parm wins
you can't do that using the top.gg API which requires a key which cannot be used on a static html site
Why does the text jump around
So maybe use the... widget thingy?
oowh, damn.
oh yeah the widget is also an option
oowh,, is that possible.
text jump around?
but it's not customizable
The title where it replaces words
On mobile it breaks line
:)
It's really nice
So it pushes content down
yeah just use this thing
on mobile

this has me gravely concerned
i did not check my site for any mobile bugs at all
thank
Yeah the typing thing is broken on mobile
It works on mobile but the typing thing ruins the homepage
hmm i see
but that means your bot's not sending that data to the API
i have an idea to fix the mobile error but i'll have to mess around with CSS media scaling later
And how would i fix that?
use the #topgg-api from your bot to send that data.
okay, got it,.
That’s be great, I’ll read trough the actual text when you do cause it keeps making me lose where I am
A bit out of context... But can I eat Romanoff Noodles
Man I hate browsers why not support animation on grid-template
Cmonnnnn
Only works on Firefox :C
you'd have to make them first.
I never tried them actually. Is it an actual brand>?
no, just google it
Sign of a really shit dev right there that doesn't google first, ask second.
smh
2021-02-23T15:06:49.453141+00:00 app[Worker.1]: at Api._request (/app/node_modules/@top-gg/sdk/dist/structs/Api.js:74:19)
2021-02-23T15:06:49.453142+00:00 app[Worker.1]: at processTicksAndRejections (internal/process/task_queues.js:93:5)
2021-02-23T15:06:49.453142+00:00 app[Worker.1]: at async Api.postStats (/app/node_modules/@top-gg/sdk/dist/structs/Api.js:94:9) {
2021-02-23T15:06:49.453144+00:00 app[Worker.1]: response: { error: 'Unauthorized' }
2021-02-23T15:06:49.453145+00:00 app[Worker.1]: }```i literally have my fucking top.gg token in here

literally it is there
REad #site-status and #support and find out
muted for seizure-inducing emoji
React + typescript + styled components is so fun how have I lived without style components in my life
Honestly, vue > react
it's been 2 months and I have loved and enjoyed every single second of switching to vue, learning it, and using it.
Agree to disagree
no
shut up
just use template literals. and only that.
rude
Vue is great
perhaps
I've hit the wall with styled-components
i have tried react but not vue
SIgh I'm wasting my time rn with styled-components
can someone help me with html & js
<body>
<input type="text" placeholder="Username" id="username" class="inputusername">
<a href="profile.htm"><button class="signin" onclick="getUsername">Sign in</button></a>
</body>
<script src="app.js"></script>
the user here sets his username and when he clicks the sign in button the function getUsername() should be triggered
function getUsername() {
let userVal = document.getElementById("username").value;
}
document.getElementById("user").innerHTML = userVal;
Now here the userVal is defined as the username that the he set and then it should get the element whose id is "user" and change it to the userVal
<body>
<div class="form-box">
<div class="profile-img"><img src="Symbol.png" alt=""></div>
<div class="username" id="user">Username</div>
</div>
</body>
<script src="app.js"></script>
And here is the element whose id is "user". But when i click it just redirects me to the profile page but does not change the username
That's because the button is wrapped in an anchor tag
and when an anchor tag is clicked, it redirects immediately
you should redirect to the other page with js, location.href = "link"
Also, the document.getElementById("user").innerHTML = userVal; should be inside the getUsername function
Alternatively, return the userVal from the getUsername function, and do document.getElementById("user").innerHTML = getUsername();
it's a chat bot what the hell do you think it's gonna do, generate meaningful conversations?
async function chatbotvoice(message){
console.log(message)
const speech = new SpeechSynthesisUtterance();
await fetch(`https://api.pgamerx.com/ai/response?message=${message}`)
.then(res => res.json())
.then(async(json) => {
speech.text = await json[0]
return
})
window.speechSynthesis.speak(speech);
chatareamain.appendChild(showchatbotmsg(speech.text));
}
My code
How am I using it
recognition.onresult=async function(e){
let resultIndex = e.resultIndex;
let transcript = e.results[resultIndex][0].transcript;
chatareamain.appendChild(showusermsg(transcript));
await chatbotvoice(transcript);
console.log(transcript);
}```
The api works if I make requests through my bot or even the browser itself
ok well clearly the API's returning the wrong things here
it isn't
well if it wasn't, you'd have proper messages.
so when you console.log(message) it's the correct thing you're expecting to see?
yep
And what about the json response
never logged that
hey so
lmao
It's working absolutely fine if I run the local file
but when I run from the domain
it do be causing problems
so
what do I do
Try logging from the domain and check network tab in dev tools
Maybe you will find some network security / browser issue there
@oak cliff ads
@earnest jackal please do not advertise in our server, it is against our rules.
nope
but problem is
i changed the code
to make it log more stuff
it's not logging it
which means code on server side isn't changed
but I changed it
deleted nginx record
added it again, restarted the server
still same issue
see this
Domain side ^
Local
idk what's wrong
cache ?
use ctrl + f5
no goddamn no
people get angry that chrome uses too much ram, doing that will only get worse
still, ctrl + f5 is cleaner

it's a hard refresh
wipes cache for that site
works just fine
not so much when you need to clear cookies for the site
I still add random get queries
random queries will only create new caches
dot dot dot
sorry to interrupt the discussion but if I'm using the .findOne function in MongoDB, how do I get the position of the found element in my collection. I have a collection with members and their "level" and I'm using .sort to sort them by their level in descending order. Now I want to find a specific member in that sorted collection and get his "position" in the collection. How would I do that?
The indexOf() method returns the first index at which a
given element can be found in the array, or -1 if it is not present.
how can i get rid of that colour tint on my bots page
idk
i dislike it, as it messes with my page style
colour tint?
yes
You mean like accents?
you have a tint?
yes, the colour sticks out like a sore thumb against the grey and makes it look like my backlight is failing
ah nice
they changed the CSS again
its this thing that sets it, but theres no 'off'

so i was going to force an off in my css
fun times
Hi guys
Hmm gonna take a look in a few seconds of I’m back on PC
Just to specify again is the red accent background of the site bothering you or of the description?
how should i get old and new from permissions_new from this:
[
{ key: 'permissions', old: 1880015040, new: 1880016080 },
{ key: 'permissions_new', old: '1880015040', new: '1880016080' }
]
those are bitflags
ik
discord.js?
veld broke that and I don't know why lol it was broken for almost 2 weeks
I fixed it but apparently it took precedence over your css
I don't even know what he changed
@woeful pike do you happen to know please what i put in my stylesheet in my bots page to override the tinted corner

this is some z-index issue, I'll try to fix this one with kyoyu this week it shouldn't be going over your description
ah, cool thanks 🙂
so how should i get bit fields from a role?
we'll try our best to release the new html/css for the bot pages by the end of the week so you can test stuff out
that's the beta page now so i don't wanna give you a solution that breaks next week haha
can you not break something @woeful pike
Stop pushing stuff to prod
trying my best
nice
90% of the bugs on the page are related to bad infrastructure and dynamic typing
not sure how a startup can use a dynamically typed language in production without shit constantly falling apart
d i d i h e a r d y n a m i c t y p i n g
hopefully js will be gone and we'll never deal with shitty dynamic typing again
Idk man, Python devs do it all the time and we see less issues than this lol
I mean we didn't build this codebase from the ground up. Still cleaning up nightmare code
bots.forEach((value, index) => {
bots[index] = cleanBotData(value);
if (index === bots.length - 1) return res.sendApi({ results: bots, limit, offset, count: bots.length, total });
});
saw this in the codebase last month
🙂
oh no
that feels the same as when I felt while recoding my bot
rewriteeeeeeeee
return????????
amogus????
what are they even trying to achieve with this
I mean it's not the worse I've ever seen, but it's definitely something to be made better
this is a pretty good explanation on why you never rewrite
wait until the end of the loop before sending data, it looks
or at least, almost never. And this isn't one of the 1% cases
honestly yeah
it always does
at this rate im gonna get double billed for premium that i cancelled 🤣
It's always easy to say rewrite until you gotta do it I guess.
@green kestrel can't even see the accent on your site lel
rewrite feels like the correct choice 100% of the the time but in reality it's closer to 0%
rewrite is often a bad idea
i disagree in the case of this site lol
but it depends how hairy the code is
How many unintentional bugs do you have to hit before it's more than 0%
and if there are people left who can maintian it
trash the whole thing, lemme rewrite it in vuejs
Lmfao
https://github.com/Orcpub/orcpub mylife tbh 
we're breaking things off into microservices and such, but we can't afford to have devs just sit and write everything over again
iM tHe BeSt DeV uR JuST tRasH
50,000 lines of clojure
clojure.... theres your problem
Microservices, monorepos, code sharing complexities... that's a lot of work.
dynamic typing
the language itself is fine 😔
a fine mess
Is the backend written in node.js?
🤣
its the fact that it was written by one dude in 4 months
it's just that it ain't scalable
not even 4 months tbh
like 10 weeks iirc
so...?
look at this
that's like 22 commits per day wtf
oh god that's a lotta tech
half the things here is legacy we're still supporting
wtf lol
jquery, mongodb, mysql, js
jQuery 
bulma.. semantic lol
scemantics schemantics
oh I get to add rust in here next week too, nice
how about adding stack overflow
nothing wrong with jquery
What's rust used for
C :)
i see a lot of people shoehorning mongodb into relational systems that would work better with sql though 😄
And what's C# used for too
antibotting
simply because they use js and the js mongo libs are more mature than the mysql ones
all of our new backend is C#

wait that was meant to be a C# response
sequelize 
how much of a drop in number of votes do you expect to see with the new anti bot stuff
too much lol






